<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<META NAME="GENERATOR" CONTENT="Adobe FrameMaker 7.0/HTML Export Filter">
<LINK REL="STYLESHEET" HREF="KDM_1.0_12_codepkg.css" CHARSET="ISO-8859-1" TYPE="text/css">
<TITLE> 12	Code Package</TITLE>
</HEAD>
<BODY BGCOLOR="#ffffff">
<DIV>
<H6 CLASS="Heading">
<A NAME="pgfId-998826"></A><A NAME="58728"></A>Code Package</H6>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1086553"></A>Overview</H3>
<P CLASS="Body">
<A NAME="pgfId-1089208"></A>The Code package defines a set of meta-model elements whose purpose is to represent implementation level program elements and their associations. This facet of knowledge about existing software systems corresponds to the logical view. It is determined by one or more programming languages used in the design of the particular existing software system. Code package includes meta-model elements which represent common program elements supported by various programming languages, such as data types, data items, classes, procedures, macros, prototypes, and templates.</P>
<P CLASS="Body">
<A NAME="pgfId-1100229"></A>As a general rule, in a given KDM instance, each instance of the code meta-model element represents some programming language construct, determined by the programming language of the existing software system. Each instance of a code meta-model element corresponds to a certain region of the source code in one of the artifacts of the existing software system. Exceptions to this rule are:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100230"></A>instances of the CodeModel meta-model element which are parts of the KDM infrastructure. This meta-model element is a container for other code element instances.</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100231"></A>instances of code element that explicitly represent certain abstractions provided by a programming language, such as primitive datatypes, and predefined datatypes.</LI>
</UL>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1089210"></A><A NAME="_Toc131848192"></A>Organization of the Code Package</H3>
<P CLASS="Body">
<A NAME="pgfId-1089212"></A>The Code package consists of the following 24 class diagrams:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1089214"></A>CodeModel</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097331"></A>CodeInheritances</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1089217"></A>Modules</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097342"></A>ControlElements</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097343"></A>DataElements</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097344"></A>Values</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097351"></A>PrimitiveTypes</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097366"></A>EnumeratedTypes</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097359"></A>CompositeTypes</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097374"></A>DerivedTypes</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097385"></A>Signature</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097390"></A>DefinedTypes</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097395"></A>ClassTypes</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097400"></A>Templates</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097407"></A>TemplateRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097408"></A>ClassRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097409"></A>TypeRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097410"></A>InterfaceRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097405"></A>PreprocessorDirectives</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1089219"></A>PreprocessorRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1089233"></A>Comment</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1089234"></A>Visibility</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097415"></A>VisibilityRelations</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097416"></A>ExtendedCodeElements</LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1100235"></A>The Code package depends on the following packages:</P>
<P CLASS="Body">
<A NAME="pgfId-1100236"></A>	Source</P>
<P CLASS="Body">
<A NAME="pgfId-1100237"></A>	Core</P>
<P CLASS="Body">
<A NAME="pgfId-1100240"></A>	kdm</P>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1097428"></A><A NAME="_Toc131848194"></A>CodeModel Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1097429"></A>The CodeModel class diagram follows the uniform pattern for KDM models and extends the KDM framework with specific meta-model elements related to implementation-level program elements and their associations. </P>
<P CLASS="Body">
<A NAME="pgfId-1097430"></A>The CodeModel diagram defines the following classes determined by the KDM model pattern:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097431"></A>CodeModel - a class representing a model for CodeElement.</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1097432"></A>AbstractCodeElement - a class representing an abstract parent class for all KDM entities that can be used to model code.</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100258"></A>AbstractCodeRelationship - a class representing an abstract parent of all KDM relationships that can be used to represent code</LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1100259"></A>The CodeModel diagram also defines several key abstract classes which determine the KDM taxonomy for program elements:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100256"></A>CodeItem</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100257"></A>ComputationalObject</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100262"></A>Datatype</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100263"></A>Module</LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1097442"></A>The class diagram shown in <A HREF="KDM_1.0_12_codepkg.htm#54317" CLASS="XRef">See - CodeModel Class Diagram.</A> captures these classes and their relations.</P>
<P CLASS="Body">
<A NAME="pgfId-1097443"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1097444"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1097445"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1097446"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1097450"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-1.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption1">
<A NAME="pgfId-1097452"></A><A NAME="54317"></A>- CodeModel Class Diagram </H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1100270"></A><A NAME="_Toc131848195"></A>CodeModel Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1100271"></A>The CodeModel is the specific KDM model which corresponds to the logical view of the implementation of the existing software system. CodeModel is the only model of the Program Elements Layer of KDM. CodeModel follows the uniform pattern for KDM models. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097456"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097457"></A>KDMModel</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097458"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1097464"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097461"></A>codeElement:AbstractCodeElement[0..*] {ordered}</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097463"></A>The set of the top-level elements that are defined in this code model. The CodeModel element is the owner of such CodeElement. This property subsets the ownedElement property of KDMModel derived union.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1097465"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097466"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097467"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100274"></A>CodeModel is a container for code elements. It is the implementer's responsibility to arrange code elements into one or more code models. KDM import tools should not make any assumptions about the organization of code elements into code models.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100275"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097469"></A>Abstract<A NAME="_Toc131848196"></A>CodeElement Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1097470"></A>The AbstractCodeElement is an abstract class representing any generic determined by a programming language. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097471"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097472"></A>KDMEntity</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097473"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1097479"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097476"></A>codeRelation:CodeRelation[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097478"></A>The set of code relations owned by this code model.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099873"></A>source: SourceRef[0..1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1099875"></A>Link to the physical artifact for the given code element.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1097480"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097481"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097482"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1097483"></A>AbstractCodeElement is an abstract class that is used to constrain the owned elements of some KDM containers in the Code model.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097484"></A>AbstractCodeRelationship Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1097485"></A>The AbstractCodeRelationship is an abstract class representing any relationship determined by a programming language. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097486"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097487"></A> KDMRelationship </P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097488"></A>Constraints </H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097489"></A>Semantics </H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097490"></A>AbstractCodeRelationship is an abstract class that is used to constrain the subclasses of KDMRelationship in the Code model.</P>
<P CLASS="Body">
<A NAME="pgfId-1097491"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097493"></A><A NAME="_Toc131848197"></A>CodeItem Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1097494"></A>CodeItem class represents the named elements determined by the programming language (the so-called &quot;symbols,&quot; &quot;definitions,&quot; etc.). There are AbstractCodeElements that are not CodeItems, for example ActionElements that are defined in the Action package. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097495"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097496"></A> AbstractCodeElement </P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097505"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1097506"></A>CodeItem is an abstract class that is used to constrain the owned elements of some KDM containers in the Code model.</P>
<P CLASS="Body">
<A NAME="pgfId-1097425"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1100281"></A>ComputationalObject Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1100282"></A>ComputationalObject class represents the named elements determined by the programming language which describe certain computational objects at the runtime, for example, procedures, and variables. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100283"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1100278"></A> CodeItem</P>
<P CLASS="Body">
<A NAME="pgfId-1100287"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1100291"></A>Datatype Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1100292"></A>Datatype class represents the named elements determined by the programming language which describe datatypes. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100293"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1100288"></A> CodeItem</P>
<P CLASS="Body">
<A NAME="pgfId-1100297"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1089245"></A><A NAME="_Toc131848193"></A>CodeInheritances Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1089246"></A>The CodeInheritances class diagram define how classes of the Code package inherit from the Core package. The class diagram shown in <A HREF="KDM_1.0_12_codepkg.htm#86258" CLASS="XRef">See - CodeInheritances Class Diagram.</A> captures these relations.</P>
<P CLASS="Body">
<A NAME="pgfId-1085507"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-2.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1086566"></A><A NAME="86258"></A>- CodeInheritances Class Diagram</H6>
<P CLASS="Header">
<A NAME="pgfId-1094030"></A>&nbsp;</P>
<P CLASS="Header">
<A NAME="pgfId-1102821"></A>&nbsp;</P>
<P CLASS="Header">
<A NAME="pgfId-1094069"></A>Code Elements representing Modules </P>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1093983"></A><A NAME="_Toc131848214"></A>Modules Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1093984"></A>The Modules class diagram defines meta-model elements that represent packaging aspects of programming languages, such as compilation units, shared files, and binary components. The class diagram shown in <A HREF="KDM_1.0_12_codepkg.htm#89073" CLASS="XRef">See - Module Class Diagram.</A> captures these classes and their associations.</P>
<P CLASS="Body">
<A NAME="pgfId-1093991"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-3.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1093993"></A><A NAME="89073"></A>- Module Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094685"></A><A NAME="_Toc131848215"></A>Module Class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1094691"></A>The Module class is a generic KDM modeling element that represents an entire software module or a component, as determined by the programming language and the software development environment. A module is a discrete and identifiable program unit that contains other program elements and may be used as a logical component of the software system. Usually modules promote encapsulation (i.e. information hiding) through a separation between the interface and the implementation. In the context of representing existing software systems, modules provide the context for establishing the associations between the programming language elements which are owned by them, especially when the same logical component of a software product line is compiled multiple times with different compilation options and linked into multiple executables. Instances of the Module class represent the logical containers for program elements determined by the programming language. Modules may be further related to other KDM items, for example to KDM Inventory items of the Inventory model; or to KDM deployment elements of the Platform model. In the situation of modeling a complex software product line, logical Modules may need to be duplicated, because the exact relationships determined by the particular software component may depend on the engineering context.</P>
<P CLASS="Body">
<A NAME="pgfId-1094692"></A>The Module is an abstract KDM container that provides a common parent for several concrete classes.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094687"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1093998"></A>CodeItem</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1093999"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094005"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094002"></A>codeElement:AbstractCodeElement[0..*] {ordered}</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094004"></A>The list of owned CodeElement.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094006"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1094007"></A>Module class and its subclasses should not own SourceRef elements</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1094740"></A>Code Model can not directly own any code elements other than the subclasses of the Module class</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1094730"></A>Every code element should be owned by some instance of the Module class or its subclasses	</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1100359"></A>Instance of the Module element should have at least one stereotype</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1100357"></A>No other code element should own Module elements and its subclasses.</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094009"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100365"></A>Module is a logical container for program elements. Subclasses of Module element define semantically distinct flavors of Module, representing common categories of containers.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100363"></A>It is the implementer's responsibility to select an appropriate subclass of the Module element.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094011"></A><A NAME="_Toc131848216"></A>CompilationUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094842"></A>The CompilationUnit class is a meta-model element which represents a logical container which owns program elements. A compilation unit is an logical part of the existing software system which is sufficiently complete to be processed by the corresponding software development environment. Compilation unit is usually related to some artifact of the existing software system, for example, a physical source file. Compilation units are supported by the selected programming languages of the existing software system and as determined by the corresponding engineering process. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094861"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094014"></A>Module</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094015"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100369"></A>CompilationUnit is a stand-alone named container for program elements. Usually a CompilationUnit corresponds to a SourceFile in the InventoryModel.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094017"></A><A NAME="_Toc131848217"></A>SharedUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094018"></A>The SharedUnit class is a meta-model element which represents a shared source file as supported by the selected programming languages of the existing software system and as determined by the engineering process. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094019"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094020"></A>Module</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094021"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100374"></A>SharedUnit is a subclass of CompilationUnit, which emphasizes the ability of the program elements owned by the SharedUnit to be shared among stand-alone program elements through some form of inclusion mechanism.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094778"></A>LanguageUnit class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1094779"></A>The LanguageUnit class is a meta-model element which represents predefined datatypes and other common elements determined by a particular programming language.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094875"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1094781"></A>Module</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094879"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1094783"></A>PredefinedType class and its subclasses can only be contained in a LanguageUnit container.</H6>
<P CLASS="Body">
<A NAME="pgfId-1100379"></A>Semantics</P>
<P CLASS="Body">
<A NAME="pgfId-1100391"></A>LanguageUnit is a logical container that owns definitions of primitive and predefined datatypes for a particular language, as well as other common elements for a particular programming language. LanguageUnit may or may not correspond to a SourceFile in the InventoryModel. Some of the predefined program elements are defined in standards system files. It is the implementer's responsibility to add such files to the InventoryModel. Primitive datatypes usually do not have any corresponding files, in this situation the LanguageUnit does not have a counterpart in the InventoryModel.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094023"></A><A NAME="_Toc131848218"></A>CodeAssembly Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094024"></A>The CodeAssembly represents a logical container for the program elements that were built together (for example, compiled and linked into an executable, so that all variant selection during the compilation and static linking was resolved in a certain coordinated fashion). The same collection of logical entities has to be analyzed together. Same source files may produce a different logical model (for example, when compiled and linked for a different hardware platform, or for a different operating system). The CodeAssembly represents a collection of entities that have been analyzed together. A different variant of the conceptual family of software systems (even involving same compilation units) may need to be cloned into a separate CodeAssembly.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094025"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094026"></A>Module</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094027"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100398"></A>CodeAssembly is a logical container that provides the context for entities and relationships for a collection of program elements. CodeAssembly may correspond to an ExecutableFile elements of the InventoryModel.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1099689"></A>Package Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1099690"></A>The Package class is a subtype for Module that logical collections of program elements, as directly supported by some programming languages, such as Java.. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099691"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1099692"></A>Module</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099693"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099686"></A>A Package is a logical container for program elements as well as Modules. Packages can be nested.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1094077"></A>&nbsp;</P>
<P CLASS="Header">
<A NAME="pgfId-1093980"></A>Code Elements representing Computational Objects</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094187"></A><A NAME="_Toc131848207"></A>ControlElements Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1094188"></A>The ControlElements class diagram defines basic meta-model elements to represent callable computational objects, such as procedures, functions, methods, etc. The class diagram shown in <A HREF="KDM_1.0_12_codepkg.htm#32841" CLASS="XRef">See - ControlElements Class Diagram.</A> shows these classes and their relations.</P>
<P CLASS="Body">
<A NAME="pgfId-1094195"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-4.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094197"></A><A NAME="32841"></A>- ControlElements Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094199"></A>ControlElement class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1094200"></A>The ControlElement class is a common superclass that defines attributes for callable code elements. In the meta-model it has the role of an endpoint for some KDM relations.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094201"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094202"></A>ComputationalObject</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094203"></A>Attributes and Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094213"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094952"></A>type:Datatype[0..1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094954"></A>Optional association to the datatype of this control element</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094210"></A>codeElement:AbstractCodeElement[0..*] {ordered}</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094212"></A>Represents owned code elements, such as local definitions and actions.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094214"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1100314"></A>ControlElement should have at least one stereotype</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1100411"></A>ControlElement should own a Signature</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094215"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100427"></A> ControlElement is a generic element with under specified semantics that can be used as an extension point to define new &quot;virtual&quot; meta-model elements that represent specific named control constructs that do not fit into semantic categories of the concrete subclasses of ControlElement.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100434"></A>ControlElement represents named items of software system which describe certain behavior that can be performed by demand, through the invocation mechanism, such as a call-return mechanism, directly supported by many processor units and high-level programming languages.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100428"></A>ControlElement owns other program elements, which can include nested ControlElements.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1100430"></A><A NAME="_Toc131848209"></A>CallableUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094218"></A>The CallableUnit represents a basic stand-alone element that can be called, such as a procedure or a function.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094219"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094220"></A>ControlElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098449"></A>Attributes</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098459"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098452"></A>kind:CallableKind</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098454"></A>Indicator of the kind of the callable unit </P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098419"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100440"></A>A CallableUnit represents a named unit of behavior that can be invoked through a call-return mechanism. This is a subclass of a ControlElement. From the runtime perspective, a CallableUnit element represents a single computational object which is identified directly (using the name) or indirectly (using a reference). More precisely, the call-return mechanism implies an invocation stack, since a CallableUnit may call itself, and there may be multiple instances of the behavior represented by the CallableUnit, at various stages of completion, each corresponding to an entry in the invocation stack.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100438"></A>A CallableUnit represents global or local procedures and functions.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098426"></A>CallableKind Data Type (enumerated)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1098428"></A> CallableKind enumerated data type specifies some common properties of the CallableUnit.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098430"></A>Literal values:	</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098420"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098497"></A>regular</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098499"></A>specifies a regular definition of a procedure or function</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098478"></A>external</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098480"></A>specifies an external procedure (a prototype, definition is elsewhere)</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098511"></A>operator</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098513"></A>specifies a definition of an operator</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102827"></A>stored</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1102829"></A>specifies a stored procedure in DataModel</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098507"></A>unknown</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098509"></A>properties are unknown</P>
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098422"></A><A NAME="_Toc131848211"></A>MethodUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094230"></A>The MethodUnit represents member functions owned by a ClassUnit.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094231"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094232"></A>CallableElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094235"></A>Attributes</H6>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094968"></A>kind:MethodKind</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1094983"></A>Indicator of the kind of the method represented by this element</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094972"></A>export: ExportKind	</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094974"></A>represents the visibility of the method (public, private, protected)</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100453"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100454"></A>The MethodUnit represents member functions owned by a ClassUnit, including user-defined operators, constructors and destructors.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100455"></A>From the runtime perspective, each MethodUnit element represents a computational object that exists in the context of some class instance, therefore there exist multiple instances of such objects, each identified by the method name as well as the reference to the corresponding class instance. A class instance is identified either directly (by name) or indirectly (by reference).</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1100451"></A>MethodKind data type (enumeration)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1094238"></A>MethodKind enumerated data type defines additional specification of the kind of method, defined by a MethodUnit model element.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094239"></A>Literal Values</H6>
<P CLASS="Body">
<A NAME="pgfId-1094261"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094242"></A>method</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094244"></A>the MethodUnit represents a regular member function</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094246"></A>constructor</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094248"></A>the MethodUnit represents a constructor</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094250"></A>destructor</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094252"></A>the MethodUnit represents a destructor</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094254"></A>operator</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094256"></A>the MethodUnit represents an operator</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094956"></A>virtual</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094958"></A>the MethodUnit represents a virtual method</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1100463"></A>abstract</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1100465"></A>the MethodUnit represents an abstract method or member of an Interface</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094258"></A>unknown</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094260"></A>the kind of the MethodUnit is none of the above</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1094262"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100466"></A>Example (C language):</H6>
<P CLASS="example">
<A NAME="pgfId-1100579"></A>int main(int argc, char* argv[]) {</P>
<P CLASS="example">
<A NAME="pgfId-1100580"></A>	printf(&quot;Hello, World&#92;n&quot;);</P>
<P CLASS="example">
<A NAME="pgfId-1100581"></A>}</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100582"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1100472"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100473"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100543"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100544"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100545"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100546"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100547"></A>	xmlns:source=&quot;http://kdm.omg.org/source&quot; name=&quot;HelloWorld Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100474"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot; name=&quot;HelloWorld&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100475"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:CompilationUnit&quot; name=&quot;hello.c&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100476"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:CallableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100542"></A>			name=&quot;main&quot; type=&quot;id.5&quot; kind=&quot;regular&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100477"></A>        &lt;source xmi:id=&quot;id.3&quot; language=&quot;C&quot; snippet=&quot;int main(int argc, char* argv[]) {}&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100478"></A>        &lt;entryFlow xmi:id=&quot;id.4&quot; to=&quot;id.12&quot; from=&quot;id.2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100479"></A>        &lt;codeElement xmi:id=&quot;id.5&quot; xmi:type=&quot;code:Signature&quot; name=&quot;main&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100480"></A>          &lt;source xmi:id=&quot;id.6&quot; snippet=&quot;int main(int argc, char * argv[]);&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100481"></A>          &lt;parameterUnit xmi:id=&quot;id.7&quot; name=&quot;argc&quot; type=&quot;id.25&quot; pos=&quot;1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100482"></A>          &lt;parameterUnit xmi:id=&quot;id.8&quot; name=&quot;argv&quot; type=&quot;id.9&quot; pos=&quot;2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100483"></A>            &lt;codeElement xmi:id=&quot;id.9&quot; xmi:type=&quot;code:ArrayType&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100484"></A>              &lt;itemUnit xmi:id=&quot;id.10&quot; type=&quot;id.19&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100485"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100486"></A>          &lt;/parameterUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100487"></A>          &lt;parameterUnit xmi:id=&quot;id.11&quot; type=&quot;id.25&quot; kind=&quot;return&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100488"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100489"></A>        &lt;codeElement xmi:id=&quot;id.12&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100490"></A>          &lt;source xmi:id=&quot;id.13&quot; language=&quot;C&quot; snippet=&quot;printf(&amp;quot;Hello, World!&#92;n&amp;quot;);&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100491"></A>          &lt;codeElement xmi:id=&quot;id.14&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100540"></A>		name=&quot;&amp;quot;Hello, World!&#92;n&amp;quot;&quot; type=&quot;id.19&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100492"></A>          &lt;actionRelation xmi:id=&quot;id.15&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.14&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100493"></A>          &lt;actionRelation xmi:id=&quot;id.16&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.20&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100494"></A>          &lt;actionRelation xmi:id=&quot;id.17&quot; xmi:type=&quot;action:CompliesTo&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100541"></A>					to=&quot;id.20&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100495"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100496"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100497"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100498"></A>    &lt;codeElement xmi:id=&quot;id.18&quot; xmi:type=&quot;code:LanguageUnit&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100499"></A>      &lt;codeElement xmi:id=&quot;id.19&quot; xmi:type=&quot;code:StringType&quot; name=&quot;char *&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100500"></A>      &lt;codeElement xmi:id=&quot;id.20&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;printf&quot; type=&quot;id.21&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100501"></A>        &lt;codeElement xmi:id=&quot;id.21&quot; xmi:type=&quot;code:Signature&quot; name=&quot;printf&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100502"></A>          &lt;parameterUnit xmi:id=&quot;id.22&quot; name=&quot;&quot; type=&quot;id.25&quot; kind=&quot;return&quot; pos=&quot;0&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100503"></A>          &lt;parameterUnit xmi:id=&quot;id.23&quot; name=&quot;format&quot; type=&quot;id.19&quot; pos=&quot;1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100504"></A>          &lt;parameterUnit xmi:id=&quot;id.24&quot; name=&quot;arguments&quot; kind=&quot;variadic&quot; pos=&quot;2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100505"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100506"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100507"></A>      &lt;codeElement xmi:id=&quot;id.25&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;int&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100508"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100509"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100510"></A>  &lt;model xmi:id=&quot;id.26&quot; xmi:type=&quot;source:InventoryModel&quot; name=&quot;HelloWorld&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100511"></A>    &lt;inventoryElement xmi:id=&quot;id.27&quot; xmi:type=&quot;source:SourceFile&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100539"></A>			name=&quot;hello.c&quot; language=&quot;C&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100512"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100513"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="Body">
<A NAME="pgfId-1100467"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1095039"></A>DataElements Class Diagram</H3>
<P CLASS="paragraph">
<A NAME="pgfId-1095069"></A>The DataElements class diagram defines meta-model constructs to represent the named data items of existing software systems, for example, global and local variables, record files, and formal parameters. The class diagram at <A HREF="KDM_1.0_12_codepkg.htm#23881" CLASS="XRef">See - DataElement Class Diagram.</A> shows these classes and their associations.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1095099"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-5.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1095195"></A><A NAME="23881"></A>- DataElement Class Diagram </H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095196"></A>DataElement class (generic)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1095197"></A>The DataElement class is a generic modeling element that defines the common properties of several concrete classes that represent the named data items of existing software systems, for example, global and local variables, record files, and formal parameters. KDM models usually use specific concrete subclasses. The DataElement class itself is a concrete class that can be used as an extended code element, with a certain stereotype. As an extended element DataElement is more specific than CodeElement.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095106"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095107"></A>ComputationalObject</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098056"></A>Attributes</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098066"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098059"></A>ext:String</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098061"></A>optional extension representing the original representation of the data element</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098063"></A>size: Integer	</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098065"></A>specifies the optional constraint on the number of elements any value of the storable element may contain according to the semantics of the base datatype. Size attribute corresponds to the maximum-size bound in a size-subtype of the base datatype.</P>
</TD>
</TR>
</TABLE>
<P CLASS="paragraph">
<A NAME="pgfId-1098054"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095109"></A>Associations</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095238"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1095242"></A>codeElement:Datatype[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1095273"></A>anonymous datatypes used in the definition of the datatype of the current DataElement</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1095246"></A>type:Datatype[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1095297"></A>the datatype of the DataElement, that describes the values of the DataElement</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095112"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095113"></A>DataElement represents computational objects of existing software system which are associated with a value of a particular datatype. DataElement class is an extended meta-model element, that can be used to represent variables of an existing software system, that do not fit into more precise semantics of the subclasses of DataElement. </P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095114"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1095115"></A>	DataElement class should have at least one Stereotype.</H6>
</DIV>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095116"></A>StorableUnit class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1095117"></A>StorableUnit class is a concrete subclass of the StorableElement class that represents variables of the existing software system.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095118"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095119"></A>DataElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098117"></A>Attribute:</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100626"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1100602"></A>kind:StorableKind</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1100604"></A>optional attribute that specifies the common details of a StorableUnit (see StorableKind enumeration datatype).</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100619"></A>Semantics:</H6>
<P CLASS="Body">
<A NAME="pgfId-1100614"></A>StorableUnit represents a variable of existing software system - a computational object to which different values of the same datatype can be associated at different times. From the runtime perspective, a StorableUnit element represents a single computational object which is identified either directly (by name) or indirectly (by reference).</P>
<P CLASS="Body">
<A NAME="pgfId-1100606"></A>StorableUnit represents both global and local variables.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1100607"></A>StorableKind data type (enumeration)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1098339"></A>StorableKind enumeration data type defines several common properties of a StorableUnit related to their life-cycle, visibility and memory type.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098365"></A>Literal values:</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098371"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098375"></A>global</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098377"></A>specifies a global variable</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098379"></A>local</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098381"></A>specifies a local variable</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098383"></A>static</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098385"></A>specifies a global variable with restricted scope</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098387"></A>external</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098389"></A>specifies an external variable (a prototype)</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098391"></A>register</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098393"></A>specifies a temporary variable</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098395"></A>unknown</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098397"></A>properties are unknown</P>
</TD>
</TR>
</TABLE>
<P CLASS="paragraph">
<A NAME="pgfId-1098370"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1102832"></A>ExportKind data type (enumeration)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1102833"></A>ExportKind enumeration data type defines several common properties of a MemberUnit and MethodUnit related to their  visibility and other properties.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102834"></A>Literal values:</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102860"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102837"></A>public</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1102839"></A>specifies a public member or method</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102841"></A>private</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1102843"></A>specifies private member or method</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102845"></A>protected</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1102847"></A>specifies a protected member or method</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102849"></A>final</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1102851"></A>specifies final member or method</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102857"></A>unknown</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1102859"></A>properties are unknown</P>
</TD>
</TR>
</TABLE>
<P CLASS="paragraph">
<A NAME="pgfId-1102861"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095121"></A>ItemUnit class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1095122"></A>ItemUnit class is a concrete subclass of the DataElement class that represents anonymous data items that are parts of complex datatypes, for example, record fields, pointers, and arrays. Instances of ItemUnit class are endpoints of KDM data relations that describe access to complex datatypes.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095123"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095124"></A>DataElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100635"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100629"></A>An ItemUnit represents a data element that exists in the context of another data element. From the runtime perspective, each ItemUnit represents a family of data elements, each of which is identified not only by the identity of the ItemUnit, but also by the identity of the owner element.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095125"></A>IndexUnit class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1095126"></A>IndexUnit class is a concrete subclass of the DataElement class that represents an index of an array datatype. Instances of IndexUnit class are endpoints of KDM data relations that describe access to arrays.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095127"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095128"></A>DataElement</P>
<P CLASS="paragraph">
<A NAME="pgfId-1095129"></A>Semantics</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100646"></A>IndexUnit represents an index of an ArrayType. IndexUnit is an optional element.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095130"></A>MemberUnit class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1095131"></A>MemberUnit class is a concrete subclass of the DataElement class that represents an member of a class type. Instances of MemberUnit class are endpoints of KDM data relations that describe access to classes. MemberUnit is similar to an ItemUnit. The difference between a ItemUnit and a MemberUnit is that a ItemUnit usually represents a part of a certain existing computational object, while the computational object corresponding to a MemberUnit is usually determined by the class instance. In case of accessing structures via pointers, this distinction becomes more subtle. MemberUnit defines some additional attributes.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095132"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095133"></A>DataElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095134"></A>Attributes</H6>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1095368"></A>export:ExportKind</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1095391"></A>represents the visibility of the member (public, private, protected)</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095136"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1095137"></A>	MemberUnit can be owned only by a ClassUnit</H6>
<P CLASS="Body">
<A NAME="pgfId-1100651"></A>Semantics</P>
<P CLASS="Body">
<A NAME="pgfId-1100663"></A>MemberUnit represents a member of a class. From the runtime perspective, each MemberUnit element represents a family of computational objects, each of which is a part of some class instance.Each MemberUnit is identified by the name of the MemberUnit, as well as by the direct of indirect identity of the corresponding class instance.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095138"></A>ParameterUnit class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1095139"></A>ParameterUnit class is a concrete subclass of the DataElement class that represents an formal parameter, for example a formal parameter of a procedure. ParameterUnits are owned by the Signature element. Instances of ParameterUnit class are endpoints of KDM data relations that describe access to formal parameters.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095140"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095141"></A>DataElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095142"></A>Attributes</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095411"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1095415"></A>kind:ParameterKind	</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1095430"></A>optional attribute defining the parameter passing convention for the attribute</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1095434"></A>pos:Integer</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1095446"></A>position of the attribute in the signature</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095144"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1095146"></A>	return parameter of a signature does not have a pos attribute</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1095147"></A>	return ParameterUnit is a signature should have a kind=&quot;return&quot;</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1095148"></A>	there can be at most one ParameterUnit within a certain Signature with a return kind</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095149"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100674"></A>ParameterUnit is a data element that from the runtime perspective represents a computational object that exists in the context of an instance of some ControlElement &quot;in the process of execution&quot;.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1095150"></A>Instances of ParameterUnit class are owned by a instances of a Signature class. ParameterUnits within a Signature are ordered. The value of the pos attribute of a ParameterUnit should correspond to the position of the parameter in the Signature. The return ParameterUnit is distinguished by the value of the kind attribute. To represent signatures of programming languages that allow named parameters (binding of actual parameters by name rather than by a position), the producer of the KDM model is responsible for computing correct positions of the named parameters and determining appropriate ParameterUnits as targets for relations to named parameters. ParameterKind enumeration datatype is described in section &quot;Signature class diagram&quot;.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096300"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1096301"></A>ValueElements class diagram</H3>
<P CLASS="paragraph">
<A NAME="pgfId-1096302"></A>ValueElements class diagram defines meta-model elements that represent data values which are used in the artifacts of the existing software system.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096303"></A>The classes and associations of the ValueElements class diagram are shown at <A HREF="KDM_1.0_12_codepkg.htm#45038" CLASS="XRef">See - ValueElements Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1096307"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-6.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096308"></A><A NAME="45038"></A>- ValueElements Class Diagram </H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096313"></A>ValueElement class (abstract)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1096314"></A>ValueElement class is an abstract meta-model element that represents values used in the artifacts of existing software systems. This abstract class defines the common properties of the concrete subclasses, for which more precise semantics is provided. KDM model of an existing software system usually uses concrete subclasses of the ValueElement class. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096315"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096316"></A>DataElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098099"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1098100"></A>	ValueElement and its subclasses not have owned code elements</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1098101"></A>	ValueElement and its subclasses can not be used as the target of relations Writes, and Addresses</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096319"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096320"></A>A value element is a data element which represents a single value of the corresponding datatype. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1100685"></A>ValueElement class and its subclasses correspond to ISO/IEC 11404:1996 literals and values. The datatype of the value is represented by the type property (defined for its superclass DataElement class).</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096321"></A>Value class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1096322"></A>Value class is a meta-model element that represents values used in the artifacts of existing software systems.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096323"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096324"></A>ValueElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096325"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096326"></A>Value class corresponds to ISO/IEC 11404:1996 literals of primitive types, such as boolean-literal, state-literal, enumerated-literal, character-literal, ordinal-literal, time-literal, integer-literal, rational-literal, scaled-literal, real-literal, void-literal, pointer-literal, bitstring-literal, string-literal. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1096327"></A>The name attribute of the ValueClass represents the name or a string representation of the value.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096328"></A>ValueList class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1096329"></A>The ValueList class is a meta-model element that represents values of aggregated datatypes.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096330"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096331"></A>ValueElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096332"></A>Associations</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096378"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096386"></A>valueElement:ValueElement[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1096388"></A>component values</P>
</TD>
</TR>
</TABLE>
<P CLASS="paragraph">
<A NAME="pgfId-1096333"></A>	</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096334"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096335"></A>A ValueList is a data element associated with a single value of some non-primitive datatype. The value of the complex datatype is represented as a tuple of values for each subcomponent of the complex datatype.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100690"></A>Value class corresponds to ISO/IEC 11404:1996 values for aggregated datatypes such as choice-value, record-value, set-value, sequence-value, bag-value, array-value, table-value.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096309"></A>&nbsp;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1095085"></A>&nbsp;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1095044"></A>&nbsp;</P>
<P CLASS="Header">
<A NAME="pgfId-1094083"></A>Code Elements representing Datatypes</P>
<P CLASS="Header">
<A NAME="pgfId-1098572"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1098589"></A>Data representation of KDM is aligned with ISO/IEC 11404 (Language-Independent datatypes) standard. In particular, KDM provides distinct meta-model elements for &quot;data elements&quot; (for example, global and local variables, constants, record fields, parameters, class members, array items and pointer base elements) and &quot;datatypes&quot;. Each data element has an association &quot;type&quot; to its datatype. KDM distinguishes primitive datatypes (for example Integer, Boolean), complex user-defined datatypes (for example, array, pointer, sequence) and named datatypes (for example, a class, a synonym type). KDM meta-model elements corresponding to datatypes are subclasses of a generic class Datatype. KDM meta-model elements corresponding to data elements are subclasses of a generic class DataElement.</P>
<P CLASS="Body">
<A NAME="pgfId-1098591"></A>KDM model elements represent existing artifacts determined by a programming language. KDM meta-model elements provide sufficient coverage for most common datatypes and data elements, common to programming languages. KDM also provides several powerful generic extensible elements that can be further used with stereotypes to represent uncommon situations.</P>
<P CLASS="Body">
<A NAME="pgfId-1102901"></A>In addition to the type association, KDM relationship &quot;HasType&quot; is used to track named datatypes. Anonymous datatypes can be owned by the data element that uses it. </P>
<P CLASS="Body">
<A NAME="pgfId-1102904"></A>Concrete examples of datatypes, data items and the use of the type association and the HasType relationship are provided further in the text of the specification.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1098575"></A><A NAME="_Toc131848237"></A>PrimitiveTypes Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1095659"></A>The PrimitiveTypes class diagram defines meta-model elements which represent predefined types common to various programming languages. The classes and association of the PrimitiveTypes diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#80375" CLASS="XRef">See - PrimitiveTypes Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1095666"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-7.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1097725"></A><A NAME="80375"></A>- PrimitiveTypes Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097736"></A>PrimitiveType class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1097737"></A>The PrimitiveType is a generic meta-model element which represents primitive data types determined by various programming languages. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097738"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097739"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097740"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1100341"></A>PrimitiveType should have at least one stereotype</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097741"></A>Semantics</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100345"></A>PrimitiveType element has under specified semantics. It can be used as an extension point to define new &quot;virtual&quot; meta-model elements to represent specific primitive types that do not fit into semantic categories defined by concrete subclasses of PrimitiveType class.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097733"></A><A NAME="_Toc131848241"></A>BooleanType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095953"></A>The BooleanType is a meta-model element which represents Boolean data types common to various programming languages. A Boolean is a mathematical datatype associated with two-valued logic.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095955"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095759"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095760"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095969"></A>The KDM BooleanType class corresponds to ISO/IEC 11404:1996 Boolean datatype.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1095966"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095770"></A><A NAME="_Toc131848240"></A>CharType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095771"></A>The CharType is a meta-model element which represents character data types common to various programming languages. Character is a family of datatypes whose value spaces are character-sets</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095772"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095773"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095991"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095992"></A>The KDM CharType class corresponds to ISO/IEC 11404:1996 Character datatype.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096016"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096005"></A>OrdinalType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096006"></A>The OrdinalType class is a meta-model element that represents ordinal datatypes available in some programming languages. Ordinal is the datatype of the ordinal numbers, as distinct from the quantifying numbers (datatype Integer). Ordinal is the infinite enumerated type. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096007"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096008"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096009"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096010"></A>The KDM OrdinalType class corresponds to ISO/IEC 11404:1996 Ordinal datatype.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095994"></A><A NAME="_Toc131848245"></A>DateType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095794"></A>The DateType is a meta-model element that represents built-in data types related to dates.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095795"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095796"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095797"></A>Semantics</H6>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095799"></A><A NAME="_Toc131848246"></A>TimeType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095800"></A>The TimeType is a meta-model element which represents built-in data types related to time. Time is a family of datatypes whose values are points in time to various common resolutions: year, month, day, hour, minute, second, and fractions thereof. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095801"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095802"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095803"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095790"></A>The KDM TimeType class corresponds to ISO/IEC 11404:1996 Time datatype. The interpretation of the details of the Time datatype (in particular the time unit) is outside of the scope of KDM. KDM analysis tools can be used to analyze the KDM representation of an existing system to systematically identify the detailed information regarding the details of the Time data items. The time-unit, and other attributes can be added to the data item of the TimeType.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095781"></A><A NAME="_Toc131848239"></A>IntegerType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095782"></A>The IntegerType is a meta-model element which represents integer data type common to various programming languages. Integer is the mathematical datatype comprising of exact integer values. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095783"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095784"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095785"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096041"></A>The KDM IntegerType class corresponds to ISO/IEC 11404:1996 Integer datatype.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095810"></A><A NAME="_Toc131848244"></A>DecimalType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095811"></A>The DecimalType is a meta-model element which represents decimal data types common to various programming languages. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095812"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095813"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095814"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096066"></A>The KDM DecimalType class corresponds to ISO/IEC 11404:1996 Integer datatype.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095821"></A>ScaledType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095822"></A>The ScaledType is a meta-model element which represents fixed point data types common to various programming languages. Scaled is a family of datatypes whose value spaces are subsets of the rational value space, each individual datatype having a fixed denominator, but the scaled datatypes possess the concept of approximate value.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095823"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095824"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095825"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095765"></A>The KDM ScaledType class corresponds to ISO/IEC 11404:1996 Scaled datatype.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096054"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095694"></A><A NAME="_Toc131848242"></A>FloatType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095695"></A>The FloatType is a meta-model element which represents float data types common to various programming languages. Float is a family of datatypes which are computational approximations to the mathematical datatype comprising the &quot;real numbers&quot;. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095696"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095697"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095698"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096061"></A>The KDM FloatType class corresponds to ISO/IEC 11404:1996 Real datatype.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095723"></A>VoidType Class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1095724"></A>The VoidType is a meta-model element which represents built-in &quot;void&quot; type defined in certain programming languages. Void is a datatype representing an object whose presence is syntactically or semantically required, but carries no information is a given instance</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095725"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095726"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095727"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096079"></A>The KDM VoidType class corresponds to ISO/IEC 11404:1996 Void datatype.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095832"></A><A NAME="_Toc131848238"></A>StringType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095833"></A>The StringType is a meta-model element which represents string data type common to various programming languages. String is a datatype representing strings of characters from standard character-sets.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095834"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095835"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095836"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096088"></A>The KDM StringType class corresponds to ISO/IEC 11404:1996 defined datatype Character string. The interpretation of the details of the character encoding of the StringType is outside of the scope of KDM. Multibyte character strings can be represented as StringType with a stereotype.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095885"></A>BitType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095886"></A>The BitType class is a meta-model element representing the bit datatype available in some programming languages. Bit is the datatype representing the binary digits &quot;0&quot; and &quot;1&quot;. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095887"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095888"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095889"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096097"></A>The KDM BitType class corresponds to ISO/IEC 11404:1996 defined datatype Bit.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095902"></A>BitStringType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095903"></A>The BitStringType class is a meta-model element that represents bit string datatypes available in some programming languages. Bitstring is the datatype of variable-length strings of binary digits. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095904"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095905"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095906"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096106"></A>The KDM BitstringType class corresponds to ISO/IEC 11404:1996 defined datatype Bit string.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095911"></A>OctetType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095912"></A>The OctetType class is a meta-model element that represents octet datatypes available in some programming languages. Octet is a datatype of 8-bit codes, as used for character-sets and private encodings. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095913"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095914"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095915"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096129"></A>The KDM OctetType class corresponds to ISO/IEC 11404:1996 defined datatype Octet.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096127"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095927"></A>OctetStringType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095928"></A>The OctetStringType class is a meta-model element that represents octet string datatypes available in some programming languages. Octet string is a variable-length encodings using 8-bit codes. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095929"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095930"></A>PrimitiveType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095931"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096136"></A>The KDM OctetstringType class corresponds to ISO/IEC 11404:1996 defined datatype Octet String.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1096250"></A><A NAME="_Toc131848252"></A>EnumeratedTypes Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1096184"></A>The EnumeratedTypes class diagram defines meta-model elements that represent enumerated types, which are common to various programming languages. The classes and associations of the EnumeratedTypes diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#26155" CLASS="XRef">See - EnumeratedTypes Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1096154"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-8.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096156"></A><A NAME="26155"></A>- EnumeratedTypes Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096158"></A><A NAME="_Toc131848253"></A>EnumeratedType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096236"></A>The EnumeratedType is a meta-model element that represents user-defined enumerated data types. EnumeratedType datatype defines the set of enumerated literals. Enumerated datatype is a user-defined datatype, which has a finite number of distinguished values.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096160"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096161"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096162"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096168"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096165"></A>value:Value[0..*] {ordered}</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1096167"></A>The list of enumerated literals defined for the given EnumeratedType.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096169"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096217"></A>EnumeratedType corresponds to ISO/IEC 11404:1996 Enumerated and State families of datatypes. Enumerated datatype is a family of datatypes, each of which comprises a finite number of distinguished values having and intrinsic order. State is a family of datatypes, each of which comprises a finite number of distinguished but unordered values. KDM does not make distinction between these two families.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096218"></A>Values of the Enumerated and State datatypes are represented by a Value meta-model element which is owned by the EnumeratedType. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1096215"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1096416"></A><A NAME="_Toc131848255"></A>CompositeTypes Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1096417"></A>The CompositeTypes class diagram defines meta-model elements which. represent common composite datatypes provided by various programming languages, for example records, structures, and unions. Composite datatypes is a broad category of user-defined datatypes that includes situations, in which the value of the datatype is made up of values of multiple component datatypes</P>
<P CLASS="Body">
<A NAME="pgfId-1096421"></A>The classes and associations of the StructuredTypes diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#41203" CLASS="XRef">See - CompositeTypes Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1096425"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-9.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096427"></A><A NAME="41203"></A>- CompositeTypes Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096429"></A><A NAME="_Toc131848256"></A>CompositeType Class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1096430"></A>The CompositeType is a meta-model element that represents user-defined composite datatypes, such as records, structures and unions. This element is further subclassed by more specific KDM classes. CompositeType class defines common properties for its specific subclasses, each of which has distinct semantics. CompositeType class is a KDM container. KDM models of existing software systems usually use the concrete subclasses of CompositeType class. CompositeType class itself is a concrete class and can be used as an extended meta-model element, with a stereotype. CompositeType class is a more specific meta-model element than CodeElement.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096431"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096432"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096433"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096439"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096436"></A>itemUnit:ItemUnit[0..*] {ordered}</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1096438"></A>the list of named items that represent components of the composite datatype, for example representing the individual fields of a record.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1096440"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096441"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096648"></A>	CompositeType class should be used with a stereotype</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096664"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096650"></A>CompositeType class corresponds to ISO/IEC 11404:1996 generated datatypes each of whose values is made up of values of component datatypes. In particular, KDM CompositeType class corresponds to aggregate datatypes that involve a field list in their definition, and choice datatype. The Name attribute of each ItemUnit owned by the CompositeType represents the name of the field-type. The datatype of the field-type is represented by the type attribute of the ItemUnit.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096651"></A>CompositeType class is an extended meta-model element, that can be used to represent generated datatypes of an existing software system, that do not fit into more precise semantics of the subclasses of CompositeType.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096652"></A>Any anonymous datatype used by a ItemUnit of the CompositeType should be owned by that ItemUnit.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096645"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096672"></A><A NAME="_Toc131848257"></A>ChoiceType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096673"></A>The ChoiceType class is a meta-model element that represents choice datatypes: user-defined datatypes in existing software systems, each of whose values is a single value from any of a set of alternative datatypes. An example of a choice datatype is a Pascal and Ada variant record, and a union in the C programming language. In the KDM representation, each alternative datatype is represented as an ItemUnit..</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096674"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096447"></A>CompositeType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096448"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096449"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1096450"></A>The ChoiceType corresponds to ISO/IEC 11404:1996 choice generated datatype. KDM representation does not explicitly represent the field-identifier. Name attribute of each ItemUnit owned by the ChoiceType represents either the field-identifier of the alternative datatype or a single select item that identify the variant. The datatype of the alternative is represented by the type attribute of the ItemUnit owned by the ChoiceType.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096452"></A><A NAME="_Toc131848258"></A>RecordType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096453"></A>The RecordType class is a meta-model element that represents record datatypes: user-defined datatypes in existing software systems, whose values are heterogeneous aggregations (tuples) of values of component datatypes, each aggregation having one value of each component datatype. Component datatypes are keyed by a fixed &quot;field-identifier&quot;, which is represented by the Name attribute of the ItemUnit owned by the RecordType. Examples of record datatypes include a structure in C, a record in Cobol..</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096454"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096455"></A>CompositeType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096456"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096457"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096701"></A>The RecordType corresponds to ISO/IEC 11404:1996 record aggregate datatype. The Name attribute of each ItemUnit owned by the RecordType represents the field-identifier. The datatype of the field is represented by the type attribute of the ItemUnit owned by the ChoiceType.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100788"></A>Example (Cobol):</P>
<P CLASS="example">
<A NAME="pgfId-1100797"></A>01 StudentDetails.</P>
<P CLASS="example">
<A NAME="pgfId-1100798"></A>   02 StudentId        PIC 9(7). </P>
<P CLASS="example">
<A NAME="pgfId-1100799"></A>   02 StudentName. </P>
<P CLASS="example">
<A NAME="pgfId-1100800"></A>      03 FirstName     PIC X(10).</P>
<P CLASS="example">
<A NAME="pgfId-1100801"></A>      03 MiddleInitial PIC X. </P>
<P CLASS="example">
<A NAME="pgfId-1100802"></A>      03 Surname       PIC X(15).</P>
<P CLASS="example">
<A NAME="pgfId-1100803"></A>   02 DateOfBirth.</P>
<P CLASS="example">
<A NAME="pgfId-1100804"></A>      03 DayOfBirth    PIC 99.</P>
<P CLASS="example">
<A NAME="pgfId-1100805"></A>      03 MonthOfBirth  PIC 99.</P>
<P CLASS="example">
<A NAME="pgfId-1100806"></A>      03 YearOfBirth   PIC 9(4).</P>
<P CLASS="example">
<A NAME="pgfId-1100807"></A>   02 CourseCode       PIC X(4).</P>
<P CLASS="example">
<A NAME="pgfId-1100808"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1100789"></A>MOVE &quot;Doyle&quot; To Surname</P>
<P CLASS="example">
<A NAME="pgfId-1100815"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1100790"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100700"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100744"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100745"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100746"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100747"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Record Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100701"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100702"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:CompilationUnit&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100703"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100748"></A>			name=&quot;StudentDetails&quot; type=&quot;id.3&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100704"></A>        &lt;codeElement xmi:id=&quot;id.3&quot; xmi:type=&quot;code:RecordType&quot; name=&quot;StudentDetails&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100705"></A>          &lt;itemUnit xmi:id=&quot;id.4&quot; name=&quot;StudentID&quot; type=&quot;id.23&quot; ext=&quot;PIC 9(7)&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100706"></A>          &lt;itemUnit xmi:id=&quot;id.5&quot; name=&quot;StudentName&quot; type=&quot;id.6&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100707"></A>            &lt;codeElement xmi:id=&quot;id.6&quot; xmi:type=&quot;code:RecordType&quot; name=&quot;StudentName&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100708"></A>              &lt;itemUnit xmi:id=&quot;id.7&quot; name=&quot;FirstName&quot; type=&quot;id.24&quot; ext=&quot;PIC X(10)&quot; size=&quot;10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100709"></A>              &lt;itemUnit xmi:id=&quot;id.8&quot; name=&quot;MiddleName&quot; type=&quot;id.24&quot; ext=&quot;PIC X&quot; size=&quot;1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100710"></A>              &lt;itemUnit xmi:id=&quot;id.9&quot; name=&quot;Surname&quot; type=&quot;id.24&quot; ext=&quot;PIC X(15)&quot; size=&quot;15&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100711"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100712"></A>          &lt;/itemUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100713"></A>          &lt;itemUnit xmi:id=&quot;id.10&quot; name=&quot;DateOfBirth&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100714"></A>            &lt;codeElement xmi:id=&quot;id.11&quot; xmi:type=&quot;code:RecordType&quot; name=&quot;DateOfBirth&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100715"></A>              &lt;itemUnit xmi:id=&quot;id.12&quot; name=&quot;DayOfBirth&quot; type=&quot;id.23&quot; ext=&quot;PIC 99&quot; size=&quot;2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100716"></A>              &lt;itemUnit xmi:id=&quot;id.13&quot; name=&quot;MonthOfBirth&quot; type=&quot;id.23&quot; ext=&quot;PIC 99&quot; size=&quot;2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100717"></A>              &lt;itemUnit xmi:id=&quot;id.14&quot; name=&quot;YearOfBirth&quot; type=&quot;id.23&quot; ext=&quot;PIC 9(4)&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100816"></A>					size=&quot;4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100718"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100719"></A>          &lt;/itemUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100720"></A>          &lt;itemUnit xmi:id=&quot;id.15&quot; name=&quot;CourseCode&quot; type=&quot;id.24&quot; ext=&quot;PIC X(4)&quot; size=&quot;4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100721"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100722"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100723"></A>      &lt;codeElement xmi:id=&quot;id.16&quot; xmi:type=&quot;action:BlockUnit&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100724"></A>        &lt;codeElement xmi:id=&quot;id.17&quot; xmi:type=&quot;action:ActionElement&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100725"></A>          &lt;codeElement xmi:id=&quot;id.18&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100749"></A>			name=&quot;&amp;quot;Doyle&amp;quot;&quot; type=&quot;id.24&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100726"></A>          &lt;actionRelation xmi:id=&quot;id.19&quot; xmi:type=&quot;action:Addresses&quot; to=&quot;id.2&quot; from=&quot;id.17&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100727"></A>          &lt;actionRelation xmi:id=&quot;id.20&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.18&quot; from=&quot;id.17&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100728"></A>          &lt;actionRelation xmi:id=&quot;id.21&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.9&quot; from=&quot;id.17&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100729"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100730"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100731"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100732"></A>    &lt;codeElement xmi:id=&quot;id.22&quot; xmi:type=&quot;code:LanguageUnit&quot; name=&quot;Cobol common definitions&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100733"></A>      &lt;codeElement xmi:id=&quot;id.23&quot; xmi:type=&quot;code:DecimalType&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100734"></A>      &lt;codeElement xmi:id=&quot;id.24&quot; xmi:type=&quot;code:StringType&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100735"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100736"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100737"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100697"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1096466"></A><A NAME="_Toc131848247"></A>DerivedTypes Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1096467"></A>The DerivedTypes class diagram defines meta-model elements that represent derived types, which are common to various programming languages. Examples of derived types include pointers, arrays, and sets. Derived datatypes is a broad category of user-defined datatypes that include situations, in which the value of the datatype is made up of values of a single component datatype, usually referred to as the element datatype.The classes and associations of the DerivedTypes diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#80679" CLASS="XRef">See - DerivedTypes Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1096474"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-10.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096476"></A><A NAME="80679"></A>- DerivedTypes Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096478"></A><A NAME="_Toc131848248"></A>DerivedType Class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1096479"></A>DerivedType class defines common properties for its specific subclasses, each of which has distinct semantics. DerivedType class is a KDM container. KDM models of existing software systems usually use the concrete subclasses of DerivedType class. DerivedType class itself is a concrete class and can be used as an extended meta-model element, with a stereotype. DerivedType class is a more specific meta-model element than CodeElement.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096480"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096481"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096482"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096488"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096485"></A>itemUnit:ItemUnit[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1096487"></A>The ItemUnit that represents the base class of the derived type.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096756"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096763"></A>	DerivedType class should be used with a stereotype</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096780"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096765"></A>DerivedType class corresponds to several ISO/IEC 11404:1996 aggregated datatypes, whose values are made up of values of a single component datatype. DerivedType class is an extended meta-model element, that can be used to represent aggregated datatypes with a single base datatype of an existing software system, that do not fit into more precise semantics of the subclasses of DerivedType. The name attribute of the ItemUnit can be omitted. The datatype of the element-type is represented by the type attribute of the ItemUnit owned by the DerivedType.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096766"></A>Any anonymous datatype used by ItemUnit of the DerivedType should be owned by that ItemUnit.</P>
<P CLASS="Body">
<A NAME="pgfId-1096494"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096793"></A><A NAME="_Toc131848251"></A>ArrayType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096794"></A>The ArrayType is a meta-model element that represents array datatypes. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096795"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096796"></A>DerivedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096817"></A>Attributes</H6>
<P CLASS="Body">
<A NAME="pgfId-1096840"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096837"></A>size:Integer</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1096858"></A>the size of the array (the maximum number of elements)</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096877"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096883"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096880"></A>indexUnit:IndexUnit[1]	</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1096882"></A>the index of the array</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096896"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096798"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1096802"></A>ArrayType corresponds to ISO/IEC 11404:1996 array datatype. The name attribute of the ItemUnit can be omitted if the element type is anonymous. The datatype of the element-type is represented by the type attribute of the ItemUnit owned by the ArrayType. The IndexItem represents the index of the array. The name attribute of the IndexUnit can be omitted.</P>
<P CLASS="Body">
<A NAME="pgfId-1096803"></A>KDM ArrayType supports a single index. Multidimensional arrays can be represented where an ItemUnit is referencing an anonymous ArrayType that represents internal dimensions(s). The IndexItem of the ArrayType that owns an internal anonymous ArrayType precedes the IndexItem of the owned ArrayType. </P>
<P CLASS="Body">
<A NAME="pgfId-1096804"></A>Any anonymous datatype used by IndexUnit of the ArrayType should be owned by that IndexUnit.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097035"></A><A NAME="_Toc131848250"></A>PointerType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1097036"></A>The PointerType is a meta-model element that represents pointer datatypes whose values constitutes a means of reference to values of another datatype, designated the element datatype.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097037"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097038"></A>DerivedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097039"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097040"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097041"></A>PointerType corresponds to ISO/IEC 11404:1996 pointer generated datatype. From ISO perspective the pointer datatype is not an aggregated datatype, which leads to some mismatch with the semantics of the superclass. The Name attribute of the ItemUnit owned by the PointerType can be omitted. The datatype of the element-type is represented by the type attribute of the ItemUnit owned by the PointerType. </P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100819"></A>Example (C):</H6>
<P CLASS="example">
<A NAME="pgfId-1100850"></A>struct tlist {</P>
<P CLASS="example">
<A NAME="pgfId-1100851"></A>    struct  tlist * next;</P>
<P CLASS="example">
<A NAME="pgfId-1100852"></A>    int value;</P>
<P CLASS="example">
<A NAME="pgfId-1100848"></A>} * phead, * pcurrent;</P>
<P CLASS="example">
<A NAME="pgfId-1100863"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1100867"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1100825"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100826"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100868"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100869"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100870"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100871"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;LinkedList Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100827"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100828"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;action:BlockUnit&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100829"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100872"></A>			name=&quot;phead&quot; type=&quot;id.3&quot; kind=&quot;unknown&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100830"></A>        &lt;codeElement xmi:id=&quot;id.3&quot; xmi:type=&quot;code:PointerType&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100831"></A>          &lt;itemUnit xmi:id=&quot;id.4&quot; type=&quot;id.5&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100832"></A>            &lt;codeElement xmi:id=&quot;id.5&quot; xmi:type=&quot;code:RecordType&quot; name=&quot;tlist&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100833"></A>              &lt;itemUnit xmi:id=&quot;id.6&quot; name=&quot;next&quot; type=&quot;id.3&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100834"></A>              &lt;itemUnit xmi:id=&quot;id.7&quot; name=&quot;value&quot; type=&quot;id.8&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100835"></A>                &lt;codeElement xmi:id=&quot;id.8&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;int&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100836"></A>              &lt;/itemUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100837"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100838"></A>          &lt;/itemUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100839"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100840"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100841"></A>      &lt;codeElement xmi:id=&quot;id.9&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1100873"></A>		name=&quot;pcurrent&quot; type=&quot;id.3&quot; kind=&quot;unknown&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100842"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100843"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1100844"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="Body">
<A NAME="pgfId-1096790"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1100817"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096496"></A><A NAME="_Toc131848249"></A>RangeType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096497"></A>RangeType is a meta-model element that represents user-defined subtypes of any ordered datatype by placing new upper and/or lower bounds on the value space. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096498"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096499"></A>DerivedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096971"></A>Attributes</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096983"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096987"></A>lower: Integer</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1096989"></A>The optional lower boundary of the range</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097006"></A>upper: Integer</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1097018"></A>The optional upper boundary of the range</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096972"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1096959"></A>At least one boundary value attribute should be present</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096501"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096950"></A>RangeType corresponds to ISO/IEC 11404:1996 range subtype. From ISO perspective the range subtype is not an aggregated datatype, which leads to some mismatch with the semantics of the superclass. The Name attribute of the ItemUnit owned by the RangeType can be omitted. The datatype of the base type is represented by the type attribute of the ItemUnit owned by the RangeType. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1096951"></A>When a boundary value attribute is omitted, this means that the corresponding value is unspecified.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097050"></A>BagType class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1097051"></A>BagType class is a meta-model element that represents bag types in existing software systems: the user-defined datatypes, whose values are collections of instances of values from the element datatype. Bag types allow multiple instances of the same value occur in a given collection; the ordering of the value instances in not significant.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097052"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097053"></A>DerivedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097054"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097055"></A>BagType corresponds to ISO/IEC 11404:1996 bag aggregated datatype. The Name attribute of the ItemUnit owned by the BagType can be omitted. The datatype of the element type is represented by the type attribute of the ItemUnit owned by the BagType. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1097056"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097057"></A>SetType class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1097058"></A>SetType is a meta-model element that represents set types in existing software systems: the user-defined datatypes, whose value space is the set of all subsets of the value space of the element datatype, with operations appropriate to the mathematical set.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097059"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097060"></A>DerivedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097061"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097062"></A>SetType corresponds to ISO/IEC 11404:1996 set aggregated datatype. The Name attribute of the ItemUnit owned by the SetType can be omitted. The datatype of the element type is represented by the type attribute of the ItemUnit owned by the SetType.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097063"></A>SequenceType class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1097064"></A>SequenceType class is a meta-model element that represents sequence types in existing software systems: the user-defined datatypes, whose values are ordered sequences of values from the element datatype. The ordering is imposed on the values and not intrinsic in the element datatype; the same value may occur more than once in a given sequence.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097065"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097066"></A>DerivedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097067"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097068"></A>SequenceType corresponds to ISO/IEC 11404:1996 sequence aggregated datatype. The Name attribute of the ItemUnit owned by the SequenceType can be omitted. The datatype of the element type is represented by the type attribute of the ItemUnit owned by the SequenceType.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1097048"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1096523"></A><A NAME="_Toc131848261"></A>Signature Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1096524"></A>The Signature class diagram defines meta-model elements which represent the signature concept common to various programming languages. The classes and associations of the Signature diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#29915" CLASS="XRef">See - Signature Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1096531"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-11.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096533"></A><A NAME="29915"></A>- Signature Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096535"></A><A NAME="_Toc131848262"></A>Signature Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096536"></A>The Signature is a meta-model element which represents the concept of a procedure signature which is common to various programming languages. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096537"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096538"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096539"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096549"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096542"></A>parameterUnit:ParameterUnit[0..*] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1096544"></A>The list of parameters of the current Signature.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1096550"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096551"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096552"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100877"></A>A Signature meta-model element has a dual role in KDM models. First, it corresponds to a procedure-type family of datatypes, corresponding to the procedure-type of ISO/IEC 11404 standard. Second, it corresponds to a specific data element as part of a computational object represented by a ControlElement. In this second sense, the Signature element corresponds to the mechanism of formal and actual parameters. </P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097119"></A>ParameterKind enumeration datatype</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1097120"></A>ParameterKind datatype defines the kind of parameter passing conventions.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097121"></A>Literals</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097124"></A>							</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097156"></A>byValue</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1097185"></A>parameter is passed by value</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097260"></A>byName</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1097262"></A>parameter is passed by name</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097199"></A>byReference</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1097201"></A>parameter is passed by reference</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1100890"></A>variadic</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1100892"></A>parameter is variadic</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097195"></A>return</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1097197"></A>this is a return parameter</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1100898"></A>throws</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1100900"></A>parameter represents an exception thrown by the procedure</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1100894"></A>exception</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1100896"></A>parameter to a catch block</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1100902"></A>catchall</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1100904"></A>special parameter to a catch block</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1097191"></A>unknown</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1097193"></A>the parameter passing convention is unknown</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097127"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097128"></A>If the parameter kind is omitted then the corresponding parameter is passed byValue. Return parameter is only distinguished by the parameter kind return value. If no parameters of a Signature have parameter kind value return, this means that the Signature does not define a return value.</P>
<P CLASS="Header">
<A NAME="pgfId-1096520"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094096"></A>DefinedTypes Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1095477"></A>DefinedTypes class diagram defines meta-model constructs to represent defined datatypes (datatypes defined by a type declaration). The capability of defining new type identifiers is supported in many programming languages.</P>
<P CLASS="Body">
<A NAME="pgfId-1095478"></A>The classes and associations involved in the definition of KDM DefinedTypes are shown in <A HREF="KDM_1.0_12_codepkg.htm#47176" CLASS="XRef">See - DefinedTypes Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1094109"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-12.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094111"></A><A NAME="47176"></A>- DefinedTypes Class Diagram </H6>
<P CLASS="paragraph">
<A NAME="pgfId-1094112"></A>&nbsp;</P>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095522"></A><A NAME="_Toc131848200"></A>DefinedType Class (abstract)</H4>
<P CLASS="Body">
<A NAME="pgfId-1095533"></A>The DefinedType class is an abstract class that defines the common properties of several concrete classes that are used to represent type declarations in existing software systems.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095534"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095535"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095536"></A>Associations</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1095565"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1095569"></A>codeElement:Datatype[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1095571"></A>anonymous datatypes used in the definition of the datatype </P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1095576"></A>type:Datatype[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1095578"></A>the datatype of the DefinedType, that describes the values of the corresponding datatype</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100924"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1095540"></A>DefinedType element represents a named element of existing software system which corresponds to a user-defined datatype.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1100915"></A>TypeUnit class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095541"></A>The TypeUnit meta-model element represents the so-called new datatype declarations. New datatype declarations define the value-space of a new datatype, which is distinct from any other datatype. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095542"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095543"></A>DefinedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095544"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1095545"></A>TypeUnit corresponds to ISO/IEC 11404:1996 New datatype declaration and New generator declarations.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1095546"></A>SynonymUnit class</H4>
<P CLASS="Body">
<A NAME="pgfId-1095547"></A>The Synonym meta-model element represents the so-called renaming declarations. Renaming declarations declare the type name to be a synonym for another datatype.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095548"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1095549"></A>DefinedType</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1095550"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1095551"></A>SynonymUnit corresponds to ISO/IEC 11404:1996 Renaming declarations.</P>
<P CLASS="Body">
<A NAME="pgfId-1094126"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094463"></A><A NAME="_Toc131848259"></A>ClassTypes Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1094464"></A>The ClassTypes class diagram defines meta-model elements that represent common composite datatypes provided by various programming languages. The classes and association of the ClassTypes diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#13500" CLASS="XRef">See - ClassTypes Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1094471"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-13.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094473"></A><A NAME="13500"></A>- ClassTypes Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094475"></A><A NAME="_Toc131848260"></A>ClassUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094476"></A>The ClassUnit is a meta-model element that represents user-defined classes in object-oriented languages. A class datatype is a named datatype that represents a class: an ordered collection of named elements, each of which can be another CodeItem, such as a MemberUnit or a MethodUnit.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094477"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094478"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094479"></A>Attributes</H6>
<P CLASS="Body">
<A NAME="pgfId-1094489"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094482"></A>isAbstract:Boolean </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094484"></A>The indicator of an abstract class.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094490"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094496"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094493"></A>codeElement:CodeItem[0..*]{ordered} </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094495"></A>The list of class members</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094498"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094499"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100937"></A>ClassUnit is a named container for an ordered collection of named elements, each of which can be another CodeItem, such as a MemberUnit or a MethodUnit. Program elements owned by a ClassUnit may also include other (nested ClassUnits), internal datatype definitions, etc. From the runtime perspective, ClassUnit represents a family of computational objects, called class instances. MemberUnits and MethodUnits of a certain ClassUnit are identified both by the name of the member or method, as well as by a direct or indirect identification of the corresponding class instance.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100935"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094544"></A><A NAME="_Toc131848264"></A>InterfaceUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094545"></A>The InterfaceUnit is a meta-model element which represents the interface concept common to various programming languages. </P>
<P CLASS="Body">
<A NAME="pgfId-1094546"></A>In the meta-model InterfaceUnit is a subclass of Datatype. InterfaceUnit is a KDM container. InterfaceUnit owns a list of code items which represent data types as well as MethodUnits or CallableUnits. MethodUnit elements owned by an InterfaceUnit may be targets of Calls relations.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094547"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094548"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094549"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094555"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094552"></A>codeElement:CodeItem[0..*] {ordered}</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094554"></A>The list of TypeElements which correspond with the target Interface.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1094556"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094557"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094558"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096557"></A>InterfaceUnit is a logical container for code items. InterfaceUnit corresponds to a compile time descriptions of the capabilities, that can be implemented by computational objects. InterfaceUnit owns datatype definitions as well as ControlElements, which in the representation of an existing software may be the targets of certain relationships, since the binding between the interface and the actual computational objects may occur at runtime.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1096561"></A><A NAME="_Toc131848225"></A>Templates Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1096562"></A>The Templates class diagram provide basic meta-model constructs to define templates, parameters, instantiations of template and their relationships. <A HREF="KDM_1.0_12_codepkg.htm#32270" CLASS="XRef">See - Templates Class Diagram.</A> shows these classes and their associations.</P>
<P CLASS="Body">
<A NAME="pgfId-1096570"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-14.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1096572"></A><A NAME="32270"></A>- Templates Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096574"></A><A NAME="_Toc131848226"></A>TemplateUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096575"></A>The TemplateUnit is   a meta-model element that represents parameterized datatypes, common to some programming languages, for example, Ada generics, Java generics, C++ templates. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096576"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1096577"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096578"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1096588"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1096585"></A>codeElement:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="Body">
<A NAME="pgfId-1096587"></A>template formal parameters and the base datatype or computational object</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1096589"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096590"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1099963"></A>TemplateParameter should be first in the list of code element owned by the TemplateUnit</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096591"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099946"></A>The TemplateUnit class corresponds to a type declaration with formal type parameters from the ISO/IEC 11404. TemplateUnit owns the corresponding datatype definition. Formal type parameters are represented by TemplateParameter elements owned by the TemplateUnit. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1099944"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1096593"></A><A NAME="_Toc131848227"></A>TemplateParameter Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1096594"></A>TemplateParameter is a meta-model element that represents parameters of a TemplateUnit. In the meta-model, TemplateParameter is a subclass of TypeElement.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096595"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1096596"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096598"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1096599"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100945"></A>TemplateParameter represents a formal parameter of a type declaration with formal parameters (corresponding to ISO/IEC 11404). TemplateParameter are owned directly by a certain TemplateUnit. Correspondence between actual and formal parameters is positional.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1099764"></A>TemplateType class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1099765"></A>TemplateType class is a meta-model element that represents references to parameterized datatypes. The TemplateType class owns the actual parameters to the datatype reference, represented by &quot;ParameterTo&quot; relationships. The TemplateType class also owns the &quot;InstanceOf&quot; relationship to the TemplateUnit that represents the referenced parameterized datatype. TemplateType has the role of a Datatype.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099787"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099788"></A>Datatype</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099767"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1099768"></A>TemplateType class should be the origin only to template relations &quot;InstanceOf&quot; and &quot;ParameterTo&quot;</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099770"></A>Semantics:</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099771"></A>The TemplateType class corresponds to a type-reference with actual type parameters to a type declaration with formal type parameters from the ISO/IEC 11404. The type declaration with formal parameters is represented by a TemplateUnit, which ones the corresponding datatype definition. Formal type parameters are represented by TemplateParameter elements owned by the TemplateUnit. The association between the type reference and the type declaration is represented by the &quot;InstanceOf&quot; relationship. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1099772"></A>Relationship &quot;ParameterTo&quot; represents the actual type parameter. The association between the actual and formal type parameters is positional.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1096558"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1097775"></A>TemplateRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1097776"></A>The TemplateRelations class diagram defines KDM relationships that are related to the concept of an template. <A HREF="KDM_1.0_12_codepkg.htm#67043" CLASS="XRef">See - InterfaceRelations Class Diagram.</A> shows these classes and their associations.</P>
<P CLASS="Body">
<A NAME="pgfId-1097783"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-15.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1097785"></A>- TemplateRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097787"></A>InstanceOf Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1097788"></A>The InstanceOf is a meta-model element that represents &quot;instantiation&quot; relation between a AbstractCodeElement (for example, a ClassUnit) and a TemplateUnit. In the meta-model InstanceOf is a subclass of AbstractCodeRelationship.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097789"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097790"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097791"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1097801"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097794"></A>from:AbstractCodeElement[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097796"></A>The AbstractCodeElement which represents the instantiation of a template.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097798"></A>to:TemplateUnit[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097800"></A>The TemplateUnit which is being instantiated.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1097802"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097803"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1100955"></A>The to- and from- endpoints of the relationship should be different</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097804"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100950"></A>InstanceOf relationship represents an association between a reference to a parameterized datatype or a parameterized entity (for example, a generic method), to the corresponding declaration of the parametrized class.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097806"></A>ParameterTo Class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1099836"></A>The ParameterTo is a meta-model element that represents an actual type parameter in the context of a reference to a parameterized entity. ParameterTo is &quot;parametrization&quot; relation between an AbstractCodeElement (for example, a TemplateType or an ActionElement) and a CodeItem. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099837"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097809"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097810"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1097820"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097813"></A>from:AbstractCodeElement[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097815"></A>the reference to the parameterized entity (the context of the actual type parameter)</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097817"></A>to:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097819"></A>actual parameter to template instantiation.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1097821"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097822"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1099817"></A>ParameterTo relationship should be owned only by TemplateType or ActionElement</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1100961"></A>The to- and from- endpoints of the relationship should be different</LI>
</OL>
<P CLASS="paragraph">
<A NAME="pgfId-1099820"></A>Semantics</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099854"></A>Reference to a parameterized datatype is represented by a TemplateType element. Another situation is an ActionElement that references a parameterized entity, for example a call to a generic method. In this situation the ActionElement provides the context of the reference and owns the ParameterTo and InstanceOf relationships.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100996"></A>Example (Java):</P>
<P CLASS="example">
<A NAME="pgfId-1101003"></A>class foo  {</P>
<P CLASS="example">
<A NAME="pgfId-1101004"></A>static &lt;T&gt; void fromArrayToCollection(T[] a, Collection&lt;T&gt; c) { </P>
<P CLASS="example">
<A NAME="pgfId-1101005"></A>   for (T o : a) { </P>
<P CLASS="example">
<A NAME="pgfId-1101006"></A>	   c.add(o);</P>
<P CLASS="example">
<A NAME="pgfId-1101007"></A>	   }</P>
<P CLASS="example">
<A NAME="pgfId-1101008"></A>   }</P>
<P CLASS="example">
<A NAME="pgfId-1101009"></A>void demo() {</P>
<P CLASS="example">
<A NAME="pgfId-1101010"></A>	String[] sa = new String[100];</P>
<P CLASS="example">
<A NAME="pgfId-1101011"></A>	Collection&lt;String&gt; cs = new ArrayList&lt;String&gt;();</P>
<P CLASS="example">
<A NAME="pgfId-1101012"></A>	fromArrayToCollection(sa, cs);// T inferred to be String</P>
<P CLASS="example">
<A NAME="pgfId-1101016"></A>	}</P>
<P CLASS="example">
<A NAME="pgfId-1100997"></A>}</P>
<P CLASS="example">
<A NAME="pgfId-1101176"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1101024"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101025"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101177"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101178"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101179"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101180"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Template Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101026"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101027"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;foo&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101028"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:TemplateUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101181"></A>			name=&quot;fromArrayToCollection&amp;lt;T&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101029"></A>        &lt;codeElement xmi:id=&quot;id.3&quot; xmi:type=&quot;code:TemplateParameter&quot; name=&quot;T&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101030"></A>        &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:MethodUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101182"></A>			name=&quot;fromArrayToCollection&quot; type=&quot;id.6&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101031"></A>          &lt;entryFlow xmi:id=&quot;id.5&quot; to=&quot;id.14&quot; from=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101032"></A>          &lt;codeElement xmi:id=&quot;id.6&quot; xmi:type=&quot;code:Signature&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101033"></A>            &lt;parameterUnit xmi:id=&quot;id.7&quot; name=&quot;a&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101034"></A>              &lt;codeElement xmi:id=&quot;id.8&quot; xmi:type=&quot;code:ArrayType&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101035"></A>                &lt;itemUnit xmi:id=&quot;id.9&quot; type=&quot;id.3&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101036"></A>              &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101037"></A>            &lt;/parameterUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101038"></A>            &lt;parameterUnit xmi:id=&quot;id.10&quot; name=&quot;c&quot; type=&quot;id.11&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101039"></A>              &lt;codeElement xmi:id=&quot;id.11&quot; xmi:type=&quot;code:TemplateType&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101183"></A>			name=&quot;Collection&amp;lt;T1&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101040"></A>                &lt;codeRelation xmi:id=&quot;id.12&quot; xmi:type=&quot;code:ParameterTo&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101184"></A>				to=&quot;id.3&quot; from=&quot;id.11&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101041"></A>               &lt;codeRelation xmi:id=&quot;id.13&quot; xmi:type=&quot;code:InstanceOf&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101185"></A>				to=&quot;id.75&quot; from=&quot;id.11&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101042"></A>              &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101043"></A>            &lt;/parameterUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101044"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101045"></A>          &lt;codeElement xmi:id=&quot;id.14&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101186"></A>			name=&quot;a1&quot; kind=&quot;Compound&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101046"></A>            &lt;codeElement xmi:id=&quot;id.15&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101187"></A>			name=&quot;a1.1&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101047"></A>              &lt;actionRelation xmi:id=&quot;id.16&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101188"></A>				to=&quot;id.7&quot; from=&quot;id.15&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101048"></A>              &lt;actionRelation xmi:id=&quot;id.17&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.81&quot; from=&quot;id.15&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101049"></A>              &lt;actionRelation xmi:id=&quot;id.18&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.19&quot; from=&quot;id.15&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101050"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101051"></A>            &lt;codeElement xmi:id=&quot;id.19&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101189"></A>					name=&quot;a1.2&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101052"></A>              &lt;codeElement xmi:id=&quot;id.20&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101190"></A>					name=&quot;t1&quot; type=&quot;id.88&quot; kind=&quot;register&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101053"></A>              &lt;actionRelation xmi:id=&quot;id.21&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101191"></A>					to=&quot;id.40&quot; from=&quot;id.19&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101054"></A>              &lt;actionRelation xmi:id=&quot;id.22&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.83&quot; from=&quot;id.19&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101055"></A>              &lt;actionRelation xmi:id=&quot;id.23&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.20&quot; from=&quot;id.29&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101056"></A>              &lt;actionRelation xmi:id=&quot;id.24&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.25&quot; from=&quot;id.19&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101057"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101058"></A>            &lt;codeElement xmi:id=&quot;id.25&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101192"></A>				name=&quot;1.3&quot; kind=&quot;Condition&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101059"></A>              &lt;actionRelation xmi:id=&quot;id.26&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.20&quot; from=&quot;id.25&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101060"></A>              &lt;actionRelation xmi:id=&quot;id.27&quot; xmi:type=&quot;action:TrueFlow&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101193"></A>				to=&quot;id.29&quot; from=&quot;id.25&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101061"></A>              &lt;actionRelation xmi:id=&quot;id.28&quot; xmi:type=&quot;action:FalseFlow&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101194"></A>				to=&quot;id.39&quot; from=&quot;id.25&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101062"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101063"></A>            &lt;codeElement xmi:id=&quot;id.29&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101195"></A>				name=&quot;a1.4&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101064"></A>              &lt;actionRelation xmi:id=&quot;id.30&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101196"></A>				to=&quot;id.40&quot; from=&quot;id.29&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101065"></A>              &lt;actionRelation xmi:id=&quot;id.31&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.82&quot; from=&quot;id.29&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101066"></A>              &lt;actionRelation xmi:id=&quot;id.32&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.44&quot; from=&quot;id.29&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101067"></A>              &lt;actionRelation xmi:id=&quot;id.33&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.34&quot; from=&quot;id.29&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101068"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101069"></A>            &lt;codeElement xmi:id=&quot;id.34&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101197"></A>				name=&quot;a1.5&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101070"></A>              &lt;actionRelation xmi:id=&quot;id.35&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101198"></A>				to=&quot;id.10&quot; from=&quot;id.34&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101071"></A>              &lt;actionRelation xmi:id=&quot;id.36&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.44&quot; from=&quot;id.34&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101072"></A>              &lt;actionRelation xmi:id=&quot;id.37&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.84&quot; from=&quot;id.34&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101073"></A>              &lt;actionRelation xmi:id=&quot;id.38&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.19&quot; from=&quot;id.34&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101074"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101075"></A>            &lt;codeElement xmi:id=&quot;id.39&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;1.6&quot; kind=&quot;Nop&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101076"></A>            &lt;codeElement xmi:id=&quot;id.40&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101199"></A>				name=&quot;iter&quot; type=&quot;id.41&quot; kind=&quot;register&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101077"></A>              &lt;codeElement xmi:id=&quot;id.41&quot; xmi:type=&quot;code:TemplateType&quot; name=&quot;Iterator&amp;lt;T1&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101078"></A>                &lt;codeRelation xmi:id=&quot;id.42&quot; xmi:type=&quot;code:InstanceOf&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101200"></A>					to=&quot;id.78&quot; from=&quot;id.41&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101079"></A>                &lt;codeRelation xmi:id=&quot;id.43&quot; xmi:type=&quot;code:ParameterTo&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101201"></A>					to=&quot;id.3&quot; from=&quot;id.41&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101080"></A>              &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101081"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101082"></A>            &lt;codeElement xmi:id=&quot;id.44&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101202"></A>				name=&quot;o&quot; type=&quot;id.3&quot; kind=&quot;local&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101083"></A>            &lt;actionRelation xmi:id=&quot;id.45&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.15&quot; from=&quot;id.14&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101084"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101085"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101086"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101087"></A>      &lt;codeElement xmi:id=&quot;id.46&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;demo&quot; type=&quot;id.47&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101088"></A>        &lt;codeElement xmi:id=&quot;id.47&quot; xmi:type=&quot;code:Signature&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101089"></A>        &lt;codeElement xmi:id=&quot;id.48&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101203"></A>			name=&quot;sa&quot; type=&quot;id.49&quot; kind=&quot;local&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101090"></A>          &lt;codeElement xmi:id=&quot;id.49&quot; xmi:type=&quot;code:ArrayType&quot; name=&quot;ar2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101091"></A>            &lt;itemUnit xmi:id=&quot;id.50&quot; type=&quot;id.89&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101092"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101093"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101094"></A>        &lt;codeElement xmi:id=&quot;id.51&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;demo.1&quot; kind=&quot;New&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101095"></A>          &lt;codeElement xmi:id=&quot;id.52&quot; xmi:type=&quot;code:Value&quot; name=&quot;100&quot; type=&quot;id.90&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101096"></A>          &lt;actionRelation xmi:id=&quot;id.53&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.52&quot; from=&quot;id.51&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101097"></A>          &lt;actionRelation xmi:id=&quot;id.54&quot; xmi:type=&quot;action:Creates&quot; to=&quot;id.49&quot; from=&quot;id.51&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101098"></A>          &lt;actionRelation xmi:id=&quot;id.55&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.48&quot; from=&quot;id.51&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101099"></A>          &lt;actionRelation xmi:id=&quot;id.56&quot; xmi:type=&quot;action:Flow&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101100"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101101"></A>        &lt;codeElement xmi:id=&quot;id.57&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101204"></A>			name=&quot;cs&quot; type=&quot;id.58&quot; kind=&quot;local&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101102"></A>          &lt;codeElement xmi:id=&quot;id.58&quot; xmi:type=&quot;code:TemplateType&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101205"></A>			name=&quot;Collection&amp;lt;String&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101103"></A>            &lt;codeRelation xmi:id=&quot;id.59&quot; xmi:type=&quot;code:ParameterTo&quot; to=&quot;id.89&quot; from=&quot;id.58&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101104"></A>            &lt;codeRelation xmi:id=&quot;id.60&quot; xmi:type=&quot;code:InstanceOf&quot; to=&quot;id.75&quot; from=&quot;id.58&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101105"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101106"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101107"></A>        &lt;codeElement xmi:id=&quot;id.61&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;demo.2&quot; kind=&quot;New&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101108"></A>          &lt;codeElement xmi:id=&quot;id.62&quot; xmi:type=&quot;code:TemplateType&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101206"></A>				name=&quot;ArrayList&amp;lt;String&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101109"></A>            &lt;codeRelation xmi:id=&quot;id.63&quot; xmi:type=&quot;code:ParameterTo&quot; to=&quot;id.89&quot; from=&quot;id.62&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101110"></A>            &lt;codeRelation xmi:id=&quot;id.64&quot; xmi:type=&quot;code:InstanceOf&quot; to=&quot;id.85&quot; from=&quot;id.62&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101111"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101112"></A>          &lt;actionRelation xmi:id=&quot;id.65&quot; xmi:type=&quot;action:Creates&quot; to=&quot;id.62&quot; from=&quot;id.51&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101113"></A>          &lt;actionRelation xmi:id=&quot;id.66&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.57&quot; from=&quot;id.61&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101114"></A>          &lt;actionRelation xmi:id=&quot;id.67&quot; xmi:type=&quot;action:Flow&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101115"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101116"></A>        &lt;codeElement xmi:id=&quot;id.68&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;demo.3&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101117"></A>          &lt;codeRelation xmi:id=&quot;id.69&quot; xmi:type=&quot;code:InstanceOf&quot; to=&quot;id.2&quot; from=&quot;id.68&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101118"></A>          &lt;codeRelation xmi:id=&quot;id.70&quot; xmi:type=&quot;code:ParameterTo&quot; to=&quot;id.89&quot; from=&quot;id.68&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101119"></A>          &lt;actionRelation xmi:id=&quot;id.71&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.48&quot; from=&quot;id.68&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101120"></A>          &lt;actionRelation xmi:id=&quot;id.72&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.57&quot; from=&quot;id.68&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101121"></A>          &lt;actionRelation xmi:id=&quot;id.73&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.4&quot; from=&quot;id.68&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101122"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101123"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101124"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101125"></A>    &lt;codeElement xmi:id=&quot;id.74&quot; xmi:type=&quot;code:LanguageUnit&quot; name=&quot;Common Java datatypes&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101126"></A>      &lt;codeElement xmi:id=&quot;id.75&quot; xmi:type=&quot;code:TemplateUnit&quot; name=&quot;Collection&amp;lt;T&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101127"></A>        &lt;codeElement xmi:id=&quot;id.76&quot; xmi:type=&quot;code:TemplateParameter&quot; name=&quot;T&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101128"></A>        &lt;codeElement xmi:id=&quot;id.77&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;Collection&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101129"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101130"></A>      &lt;codeElement xmi:id=&quot;id.78&quot; xmi:type=&quot;code:TemplateUnit&quot; name=&quot;Iterator&amp;lt;T&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101131"></A>        &lt;codeElement xmi:id=&quot;id.79&quot; xmi:type=&quot;code:TemplateParameter&quot; name=&quot;T&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101132"></A>        &lt;codeElement xmi:id=&quot;id.80&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;Iterator&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101133"></A>          &lt;codeElement xmi:id=&quot;id.81&quot; xmi:type=&quot;code:MethodUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101207"></A>				name=&quot;iterator&quot; kind=&quot;constructor&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101134"></A>          &lt;codeElement xmi:id=&quot;id.82&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;next&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101135"></A>          &lt;codeElement xmi:id=&quot;id.83&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;hasNext&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101136"></A>          &lt;codeElement xmi:id=&quot;id.84&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;add&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101137"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101138"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101139"></A>      &lt;codeElement xmi:id=&quot;id.85&quot; xmi:type=&quot;code:TemplateUnit&quot; name=&quot;ArrayList&amp;lt;T&gt;&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101140"></A>        &lt;codeElement xmi:id=&quot;id.86&quot; xmi:type=&quot;code:TemplateParameter&quot; name=&quot;T&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101141"></A>        &lt;codeElement xmi:id=&quot;id.87&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;ArrayList&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101142"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101143"></A>      &lt;codeElement xmi:id=&quot;id.88&quot; xmi:type=&quot;code:BooleanType&quot; name=&quot;Boolean&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101144"></A>      &lt;codeElement xmi:id=&quot;id.89&quot; xmi:type=&quot;code:StringType&quot; name=&quot;String&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101145"></A>      &lt;codeElement xmi:id=&quot;id.90&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;Integer&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101146"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101147"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101148"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1101020"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1100999"></A><A NAME="_Toc131848265"></A>InterfaceRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1094561"></A>The InterfaceRelations class diagram defines KDM relationships that represent the usages of an &quot;declarations&quot; by the corresponding &quot;definition&quot; code elements. The classes and associations of the InterfaceRelations diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#67043" CLASS="XRef">See - InterfaceRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1094568"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-16.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094570"></A><A NAME="67043"></A>- InterfaceRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094572"></A><A NAME="_Toc131848266"></A>Implements Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094573"></A>The Implements is a meta-model element that represents &quot;implementation&quot; association between a CodeItem (for example, a ClassUnit) and an InterfaceUnit. &quot;Implements&quot; relationship is similar to &quot;Extends&quot;. For example, Java &quot;implements&quot; construct can be represented by KDM &quot;Implements&quot; relationship.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094574"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094575"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094576"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094586"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094579"></A>from:CodeItem[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094581"></A>The CodeItem which implements a certain InterfaceUnit.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094583"></A>to:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094585"></A>The InterfaceUnit which is being implemented by CodeItem.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1094587"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094588"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1101209"></A>The from- and to- endpoints should be different</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094589"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101217"></A>see next section</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094591"></A><A NAME="_Toc131848267"></A>ImplementationOf Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1097920"></A>The ImplementationOf is a meta-model element that represents &quot;implementation&quot; association between a CodeItem (for example, a MethodUnit) and a particular &quot;external&quot; entity, for example a MethodUnit owned by an InterfaceUnit. &quot;ImplementationOf&quot; relationship represents associations between a declaration and a definition of a computation object, common to various programming languages. While the &quot;Implements&quot; relationship is between entire containers (the target is an InterfaceUnit), the &quot;ImplementationOf&quot; relationship represents a broader range of situations:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100003"></A>particular MethodUnit of a ClassUnit that &quot;Implements&quot; an InterfaceUnit, is an &quot;ImplementationOf&quot; a particular MethodUnit, owned by that InterfaceUnit</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100008"></A>a CallableUnit may be an &quot;ImplementationOf&quot; a CallableUnit with kind external, which represents the declaration (the prototype) of that CallableUnit. </LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100009"></A>a StorableUnit may be an &quot;ImplementationOf&quot; a StorableUnit with kind external, which represents the external declaration of the StorableUnit, such as, for example, the &quot;extern&quot; construct in the C language.</LI>
</UL>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097921"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094594"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094595"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094605"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094598"></A>from:CodeItem[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094600"></A> CodeItem which implements a certain &quot;declaration&quot;.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094602"></A>to:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094604"></A> &quot;declaration&quot; which is being implemented by the CodeItem.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1094606"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094607"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1100025"></A>It is obligatory that either the origin of the ImplementationOf relationship is a ControlElement, and the target of the is a ControlElement or the origin is a DataElement and the target is a DataElement.</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1100026"></A>The kind attribute of the CodeItem at the origin of the ImplementationOf relationship should not be equal to &quot;external&quot;</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1100027"></A>The kind attribute of the CodeItem at the target of the ImplementationOf relationship should be equal to &quot;external&quot; or &quot;abstract&quot;</LI>
<LI CLASS="List1-">
<A NAME="pgfId-1101220"></A>The from- and to- endpoints should be different</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094608"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1100017"></A>A &quot;declaration&quot; entity may be represented in KDM as a ComputationalObject (ControlElement or DataElement) with kind &quot;external&quot; or &quot;abstract&quot;. Kind &quot;abstract&quot; is used for the members of the InterfaceUnit. In case of a ControlElement, Signature represents the procedure type, but not the declaration entity itself. </P>
<P CLASS="Body">
<A NAME="pgfId-1100134"></A>If both the definition and the declaration of some computational object &quot;foo&quot; are available:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100089"></A>the definition of &quot;foo&quot; may be the origin of the ImplementationOf relationship to the declaration of &quot;foo&quot;</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100085"></A>for a certain action element that uses &quot;foo&quot; the target of the KDM callable or data relations will be the definition of &quot;foo&quot;,</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100088"></A>the action element that uses &quot;foo&quot; may be the origin of a &quot;CompliesTo&quot; action relationship (defined at the InterfaceRelations class diagram of the Action package) to the declaration of &quot;foo&quot;. </LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1100129"></A>If only the declaration of some computational object &quot;bar&quot; is available in the given context of capturing knowledge about the existing software system:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100130"></A>for a certain action element that uses &quot;bar&quot; the target of the KDM callable or data relations will be the declaration of &quot;bar&quot;,</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1100150"></A>the action element that uses &quot;bar&quot; may be the origin of a &quot;CompliesTo&quot; action relationship (defined at the InterfaceRelations class diagram of the Action package) to the declaration of &quot;bar&quot;. </LI>
</UL>
<P CLASS="Body">
<A NAME="pgfId-1100096"></A> Declaration elements are usually owned by a certain SharedUnit.</P>
<P CLASS="Body">
<A NAME="pgfId-1100166"></A>In case of complex engineering process which involves multiple shared units, that are included into compilation units in complex ways, existing software system may have multiple declarations for the same computational object, or even different computational objects with same name but different properties, that are used in different contexts. In this situation the above KDM mechanism that involves three relationships (the &quot;real&quot; usage, the &quot;ImplementationOf&quot; and the &quot;CompliesTo&quot; relationships) can be used to detect subtle maintenance issues, for example, when for the same action element the target of the &quot;ImplementationOf&quot; relationship originating from the target of the &quot;real&quot; usage relationship, if different from the target of the &quot;CompliesTo&quot; relationship, originating from the action element itself.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1100014"></A>Example (Java):</H6>
<P CLASS="example">
<A NAME="pgfId-1101352"></A>package flip;</P>
<P CLASS="example">
<A NAME="pgfId-1101353"></A>public interface iFlip {</P>
<P CLASS="example">
<A NAME="pgfId-1101354"></A>	public int flip(int i);</P>
<P CLASS="example">
<A NAME="pgfId-1101332"></A>}</P>
<P CLASS="example">
<A NAME="pgfId-1101376"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1101364"></A>package flip;</P>
<P CLASS="example">
<A NAME="pgfId-1101365"></A>public class foo implements iFlip {</P>
<P CLASS="example">
<A NAME="pgfId-1101366"></A>	public foo(){}</P>
<P CLASS="example">
<A NAME="pgfId-1101367"></A>	public flip(int i) {</P>
<P CLASS="example">
<A NAME="pgfId-1101368"></A>		return i * -1;</P>
<P CLASS="example">
<A NAME="pgfId-1101369"></A>	}</P>
<P CLASS="example">
<A NAME="pgfId-1101358"></A>}</P>
<P CLASS="example">
<A NAME="pgfId-1101394"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1101378"></A>package flip;</P>
<P CLASS="example">
<A NAME="pgfId-1101379"></A>public class FlipClient {</P>
<P CLASS="example">
<A NAME="pgfId-1101380"></A>	public static void main(String[] args) {</P>
<P CLASS="example">
<A NAME="pgfId-1101381"></A>		foo f= new foo();</P>
<P CLASS="example">
<A NAME="pgfId-1101382"></A>		iFlip g=(iFlip) f;</P>
<P CLASS="example">
<A NAME="pgfId-1101383"></A>		f.flip(100);</P>
<P CLASS="example">
<A NAME="pgfId-1101384"></A>	}</P>
<P CLASS="example">
<A NAME="pgfId-1101362"></A>}</P>
<P CLASS="example">
<A NAME="pgfId-1101395"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1101235"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101236"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101333"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101334"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101335"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101336"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Interface Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101237"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101238"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:Package&quot; name=&quot;flip&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101239"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;foo&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101240"></A>        &lt;codeRelation xmi:id=&quot;id.3&quot; xmi:type=&quot;code:Implements&quot; to=&quot;id.21&quot; from=&quot;id.2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101241"></A>        &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;flip&quot; type=&quot;id.23&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101242"></A>          &lt;codeRelation xmi:id=&quot;id.5&quot; xmi:type=&quot;code:ImplementationOf&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101337"></A>				to=&quot;id.22&quot; from=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101243"></A>          &lt;entryFlow xmi:id=&quot;id.6&quot; to=&quot;id.10&quot; from=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101244"></A>          &lt;codeElement xmi:id=&quot;id.7&quot; xmi:type=&quot;code:Signature&quot; name=&quot;flip&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101245"></A>            &lt;parameterUnit xmi:id=&quot;id.8&quot; name=&quot;i&quot; type=&quot;id.53&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101246"></A>            &lt;parameterUnit xmi:id=&quot;id.9&quot; type=&quot;id.53&quot; kind=&quot;return&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101247"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101248"></A>          &lt;codeElement xmi:id=&quot;id.10&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101338"></A>				name=&quot;d1&quot; kind=&quot;Multiply&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101249"></A>            &lt;codeElement xmi:id=&quot;id.11&quot; xmi:type=&quot;code:Value&quot; name=&quot;-1&quot; type=&quot;id.53&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101250"></A>            &lt;codeElement xmi:id=&quot;id.12&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101339"></A>				name=&quot;t5&quot; type=&quot;id.53&quot; kind=&quot;register&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101251"></A>            &lt;actionRelation xmi:id=&quot;id.13&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.8&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101252"></A>            &lt;actionRelation xmi:id=&quot;id.14&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.11&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101253"></A>            &lt;actionRelation xmi:id=&quot;id.15&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.12&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101254"></A>            &lt;actionRelation xmi:id=&quot;id.16&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.17&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101255"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101256"></A>          &lt;codeElement xmi:id=&quot;id.17&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;d2&quot; kind=&quot;Return&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101257"></A>            &lt;actionRelation xmi:id=&quot;id.18&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.12&quot; from=&quot;id.17&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101258"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101259"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101260"></A>        &lt;codeElement xmi:id=&quot;id.19&quot; xmi:type=&quot;code:MethodUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101340"></A>				name=&quot;foo&quot; type=&quot;id.20&quot; kind=&quot;constructor&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101261"></A>          &lt;codeElement xmi:id=&quot;id.20&quot; xmi:type=&quot;code:Signature&quot; name=&quot;foo&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101262"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101263"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101264"></A>      &lt;codeElement xmi:id=&quot;id.21&quot; xmi:type=&quot;code:InterfaceUnit&quot; name=&quot;IFlip&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101265"></A>        &lt;codeElement xmi:id=&quot;id.22&quot; xmi:type=&quot;code:MethodUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101341"></A>				name=&quot;flip&quot; type=&quot;id.23&quot; kind=&quot;abstract&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101266"></A>        &lt;codeElement xmi:id=&quot;id.23&quot; xmi:type=&quot;code:Signature&quot; name=&quot;flip&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101267"></A>          &lt;parameterUnit xmi:id=&quot;id.24&quot; name=&quot;i&quot; type=&quot;id.53&quot; pos=&quot;1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101268"></A>          &lt;parameterUnit xmi:id=&quot;id.25&quot; type=&quot;id.53&quot; kind=&quot;return&quot; pos=&quot;0&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101269"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101270"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101271"></A>      &lt;codeElement xmi:id=&quot;id.26&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;Flipclient&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101272"></A>        &lt;codeElement xmi:id=&quot;id.27&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;main&quot; type=&quot;id.29&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101273"></A>          &lt;entryFlow xmi:id=&quot;id.28&quot; to=&quot;id.35&quot; from=&quot;id.27&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101274"></A>          &lt;codeElement xmi:id=&quot;id.29&quot; xmi:type=&quot;code:Signature&quot; name=&quot;main&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101275"></A>            &lt;parameterUnit xmi:id=&quot;id.30&quot; name=&quot;args&quot; type=&quot;id.31&quot; pos=&quot;1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101276"></A>              &lt;codeElement xmi:id=&quot;id.31&quot; xmi:type=&quot;code:ArrayType&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101277"></A>                &lt;itemUnit xmi:id=&quot;id.32&quot; name=&quot;args[]&quot; type=&quot;id.54&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101278"></A>              &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101279"></A>            &lt;/parameterUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101280"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101281"></A>          &lt;codeElement xmi:id=&quot;id.33&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101342"></A>				name=&quot;f&quot; type=&quot;id.2&quot; kind=&quot;local&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101282"></A>          &lt;codeElement xmi:id=&quot;id.34&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101343"></A>				name=&quot;g&quot; type=&quot;id.21&quot; kind=&quot;local&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101283"></A>          &lt;codeElement xmi:id=&quot;id.35&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot; kind=&quot;New&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101284"></A>            &lt;actionRelation xmi:id=&quot;id.36&quot; xmi:type=&quot;action:Creates&quot; to=&quot;id.2&quot; from=&quot;id.35&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101285"></A>            &lt;actionRelation xmi:id=&quot;id.37&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.33&quot; from=&quot;id.35&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101286"></A>            &lt;actionRelation xmi:id=&quot;id.38&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.39&quot; from=&quot;id.35&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101287"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101288"></A>          &lt;codeElement xmi:id=&quot;id.39&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101344"></A>				name=&quot;a2&quot; kind=&quot;MethodCall&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101289"></A>            &lt;actionRelation xmi:id=&quot;id.40&quot; xmi:type=&quot;action:CompliesTo&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101345"></A>				to=&quot;id.20&quot; from=&quot;id.39&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101290"></A>            &lt;actionRelation xmi:id=&quot;id.41&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101346"></A>				to=&quot;id.33&quot; from=&quot;id.39&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101291"></A>            &lt;actionRelation xmi:id=&quot;id.42&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.19&quot; from=&quot;id.39&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101292"></A>            &lt;actionRelation xmi:id=&quot;id.43&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.44&quot; from=&quot;id.39&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101293"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101294"></A>          &lt;codeElement xmi:id=&quot;id.44&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101347"></A>				name=&quot;a3&quot; kind=&quot;DynCast&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101295"></A>            &lt;actionRelation xmi:id=&quot;id.45&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.33&quot; from=&quot;id.44&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101296"></A>            &lt;actionRelation xmi:id=&quot;id.46&quot; xmi:type=&quot;action:UsesType&quot; to=&quot;id.21&quot; from=&quot;id.44&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101297"></A>            &lt;actionRelation xmi:id=&quot;id.47&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.34&quot; from=&quot;id.44&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101298"></A>            &lt;actionRelation xmi:id=&quot;id.48&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.49&quot; from=&quot;id.44&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101299"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101300"></A>          &lt;codeElement xmi:id=&quot;id.49&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101348"></A>				name=&quot;a4&quot; kind=&quot;InterfaceCall&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101301"></A>            &lt;actionRelation xmi:id=&quot;id.50&quot; xmi:type=&quot;action:CompliesTo&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101349"></A>				to=&quot;id.23&quot; from=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101302"></A>            &lt;actionRelation xmi:id=&quot;id.51&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101350"></A>				to=&quot;id.34&quot; from=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101303"></A>            &lt;actionRelation xmi:id=&quot;id.52&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.22&quot; from=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101304"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101305"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101306"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101307"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101308"></A>    &lt;codeElement xmi:id=&quot;id.53&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;int&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101309"></A>    &lt;codeElement xmi:id=&quot;id.54&quot; xmi:type=&quot;code:StringType&quot; name=&quot;String&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101310"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101311"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1101230"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094610"></A><A NAME="_Toc131848271"></A>TypeRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1094611"></A>The TypeRelations class diagram defines meta-model elements that represent semantic associations between datatypes and data elements. The classes and associations of the TypeRelations diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#33460" CLASS="XRef">See - TypeRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1094618"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-17.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094620"></A><A NAME="33460"></A>- TypeRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094622"></A><A NAME="_Toc131848272"></A>HasType Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094623"></A>The HasType is a specific meta-model element that represents semantic relation between a data element and the corresponding type element.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094624"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094625"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094626"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094636"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094629"></A>from:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094631"></A>The source data element.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094633"></A>to:Datatype[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094635"></A>The target datatype element.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1094637"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094638"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1101450"></A>The from- and to- endpoints should be different</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101448"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094639"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101456"></A>HasType relationship represents an association between a code item which uses a certain user-defined type, and that datatype. Each data element has a direct association to its datatype. HasType relationship duplicates this information if the datatype is a named user-defined datatype (rather than an anonymous datatype or a primitive datatype) which allows a uniform representation of this information as a KDM relationship. In particular, this relationship can then by used in AggregatedRelationships.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1101403"></A>HasValue Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1101404"></A>The HasValue is a specific meta-model element that represents semantic relation between a data element and its initialization data element. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101405"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1101406"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101407"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1101417"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1101410"></A>from:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1101412"></A>The source data element.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1101414"></A>to:Datatype[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1101416"></A>The target datatype element.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1101418"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101419"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101420"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101436"></A>HasValue relationship as an optional way to represent initialization. In micro KDM that it should have explicit initialization actions.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101465"></A>Example (C++):</H6>
<P CLASS="example">
<A NAME="pgfId-1101682"></A>/*----d.h---*/</P>
<P CLASS="example">
<A NAME="pgfId-1101683"></A>class D {</P>
<P CLASS="example">
<A NAME="pgfId-1101684"></A>private: int num;</P>
<P CLASS="example">
<A NAME="pgfId-1101685"></A>public:</P>
<P CLASS="example">
<A NAME="pgfId-1101686"></A>D(int x) { this-&gt;num=x; printf(&quot;Hello, this is %d&#92;n&quot;, x); }</P>
<P CLASS="example">
<A NAME="pgfId-1101687"></A>work() { printf(&quot;This is %d working&#92;n&quot;, this-&gt;num);</P>
<P CLASS="example">
<A NAME="pgfId-1101688"></A>};</P>
<P CLASS="example">
<A NAME="pgfId-1101689"></A>/*---a.cpp---*/</P>
<P CLASS="example">
<A NAME="pgfId-1101690"></A>#include &quot;d.h&quot;</P>
<P CLASS="example">
<A NAME="pgfId-1101691"></A>int g1=0;</P>
<P CLASS="example">
<A NAME="pgfId-1101692"></A>D d1(1);</P>
<P CLASS="example">
<A NAME="pgfId-1101693"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1101694"></A>/*---b.cpp--*/</P>
<P CLASS="example">
<A NAME="pgfId-1101695"></A>#include &quot;d.h&quot;</P>
<P CLASS="example">
<A NAME="pgfId-1101696"></A>extern D d1;</P>
<P CLASS="example">
<A NAME="pgfId-1101697"></A>D d2(2);</P>
<P CLASS="example">
<A NAME="pgfId-1101698"></A>main() {</P>
<P CLASS="example">
<A NAME="pgfId-1101699"></A>   int l2=0;</P>
<P CLASS="example">
<A NAME="pgfId-1101700"></A>   D * d3=new D(3);</P>
<P CLASS="example">
<A NAME="pgfId-1101701"></A>   d1.work();</P>
<P CLASS="example">
<A NAME="pgfId-1101702"></A>   d2.work();</P>
<P CLASS="example">
<A NAME="pgfId-1101703"></A>   d3-&gt;work();</P>
<P CLASS="example">
<A NAME="pgfId-1101662"></A>}</P>
<P CLASS="paragraph">
<A NAME="pgfId-1101707"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1101468"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101469"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101663"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101664"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101665"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101666"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;ClassD Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101470"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101471"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:CodeAssembly&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101472"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:CompilationUnit&quot; name=&quot;a.cpp&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101473"></A>        &lt;codeElement xmi:id=&quot;id.3&quot; xmi:type=&quot;code:IncludeDirective&quot; name=&quot;imp1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101474"></A>          &lt;codeRelation xmi:id=&quot;id.4&quot; xmi:type=&quot;code:Includes&quot; to=&quot;id.22&quot; from=&quot;id.3&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101475"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101476"></A>        &lt;codeElement xmi:id=&quot;id.5&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;g1&quot; type=&quot;id.105&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101477"></A>          &lt;codeRelation xmi:id=&quot;id.6&quot; xmi:type=&quot;code:HasValue&quot; to=&quot;id.20&quot; from=&quot;id.5&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101478"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101479"></A>        &lt;codeElement xmi:id=&quot;id.7&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;d1&quot; type=&quot;id.23&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101480"></A>          &lt;codeRelation xmi:id=&quot;id.8&quot; xmi:type=&quot;code:HasType&quot; to=&quot;id.23&quot; from=&quot;id.7&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101481"></A>          &lt;codeRelation xmi:id=&quot;id.9&quot; xmi:type=&quot;code:ImplementationOf&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101667"></A>			to=&quot;id.47&quot; from=&quot;id.7&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101482"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101483"></A>        &lt;codeElement xmi:id=&quot;id.10&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;bi1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101484"></A>          &lt;entryFlow xmi:id=&quot;id.11&quot; to=&quot;id.12&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101485"></A>          &lt;codeElement xmi:id=&quot;id.12&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;i1&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101486"></A>            &lt;actionRelation xmi:id=&quot;id.13&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.20&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101487"></A>            &lt;actionRelation xmi:id=&quot;id.14&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.5&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101488"></A>            &lt;actionRelation xmi:id=&quot;id.15&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.16&quot; from=&quot;id.12&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101489"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101490"></A>          &lt;codeElement xmi:id=&quot;id.16&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;i2&quot; kind=&quot;Calls&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101491"></A>            &lt;actionRelation xmi:id=&quot;id.17&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.21&quot; from=&quot;id.16&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101492"></A>            &lt;actionRelation xmi:id=&quot;id.18&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.25&quot; from=&quot;id.16&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101493"></A>            &lt;actionRelation xmi:id=&quot;id.19&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.7&quot; from=&quot;id.16&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101494"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101495"></A>          &lt;codeElement xmi:id=&quot;id.20&quot; xmi:type=&quot;code:Value&quot; name=&quot;0&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101496"></A>          &lt;codeElement xmi:id=&quot;id.21&quot; xmi:type=&quot;code:Value&quot; name=&quot;1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101497"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101498"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101499"></A>      &lt;codeElement xmi:id=&quot;id.22&quot; xmi:type=&quot;code:SharedUnit&quot; name=&quot;d.h&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101500"></A>        &lt;codeElement xmi:id=&quot;id.23&quot; xmi:type=&quot;code:ClassUnit&quot; name=&quot;D&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101501"></A>          &lt;codeElement xmi:id=&quot;id.24&quot; xmi:type=&quot;code:MemberUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101668"></A>			name=&quot;num&quot; type=&quot;id.105&quot; export=&quot;private&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101502"></A>          &lt;codeElement xmi:id=&quot;id.25&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;D&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101503"></A>            &lt;entryFlow xmi:id=&quot;id.26&quot; to=&quot;id.28&quot; from=&quot;id.25&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101504"></A>            &lt;codeElement xmi:id=&quot;id.27&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101669"></A>			name=&quot;&amp;quot;Hello, this is %d&#92;n&amp;quot;&quot; type=&quot;id.111&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101505"></A>            &lt;codeElement xmi:id=&quot;id.28&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101670"></A>			name=&quot;a4&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101506"></A>              &lt;actionRelation xmi:id=&quot;id.29&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.37&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101507"></A>              &lt;actionRelation xmi:id=&quot;id.30&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.24&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101508"></A>              &lt;actionRelation xmi:id=&quot;id.31&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.32&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101509"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101510"></A>            &lt;codeElement xmi:id=&quot;id.32&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a5&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101511"></A>              &lt;actionRelation xmi:id=&quot;id.33&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.27&quot; from=&quot;id.32&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101512"></A>              &lt;actionRelation xmi:id=&quot;id.34&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.37&quot; from=&quot;id.32&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101513"></A>              &lt;actionRelation xmi:id=&quot;id.35&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.106&quot; from=&quot;id.32&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101514"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101515"></A>            &lt;codeElement xmi:id=&quot;id.36&quot; xmi:type=&quot;code:Signature&quot; name=&quot;D&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101516"></A>              &lt;parameterUnit xmi:id=&quot;id.37&quot; name=&quot;x&quot; pos=&quot;1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101517"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101518"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101519"></A>          &lt;codeElement xmi:id=&quot;id.38&quot; xmi:type=&quot;code:MethodUnit&quot; name=&quot;work&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101520"></A>            &lt;codeElement xmi:id=&quot;id.39&quot; xmi:type=&quot;code:Value&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101671"></A>			name=&quot;&amp;quot;This is %d working&#92;n&amp;quot;&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101521"></A>            &lt;codeElement xmi:id=&quot;id.40&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a6&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101522"></A>              &lt;actionRelation xmi:id=&quot;id.41&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.39&quot; from=&quot;id.40&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101523"></A>              &lt;actionRelation xmi:id=&quot;id.42&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.24&quot; from=&quot;id.40&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101524"></A>              &lt;actionRelation xmi:id=&quot;id.43&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.106&quot; from=&quot;id.40&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101525"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101526"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101527"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101528"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101529"></A>      &lt;codeElement xmi:id=&quot;id.44&quot; xmi:type=&quot;code:CompilationUnit&quot; name=&quot;b.cpp&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101530"></A>        &lt;codeElement xmi:id=&quot;id.45&quot; xmi:type=&quot;code:IncludeDirective&quot; name=&quot;imp2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101531"></A>          &lt;codeRelation xmi:id=&quot;id.46&quot; xmi:type=&quot;code:Includes&quot; to=&quot;id.22&quot; from=&quot;id.45&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101532"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101533"></A>        &lt;codeElement xmi:id=&quot;id.47&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101672"></A>			name=&quot;extern d1&quot; kind=&quot;external&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101534"></A>        &lt;codeElement xmi:id=&quot;id.48&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;main&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101535"></A>          &lt;entryFlow xmi:id=&quot;id.49&quot; to=&quot;id.70&quot; from=&quot;id.48&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101536"></A>          &lt;codeElement xmi:id=&quot;id.50&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;l2&quot; type=&quot;id.105&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101537"></A>            &lt;codeRelation xmi:id=&quot;id.51&quot; xmi:type=&quot;code:HasValue&quot; to=&quot;id.20&quot; from=&quot;id.50&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101538"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101539"></A>          &lt;codeElement xmi:id=&quot;id.52&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;d2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101540"></A>            &lt;codeRelation xmi:id=&quot;id.53&quot; xmi:type=&quot;code:HasType&quot; to=&quot;id.23&quot; from=&quot;id.52&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101541"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101542"></A>          &lt;codeElement xmi:id=&quot;id.54&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;d3&quot; type=&quot;id.55&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101543"></A>            &lt;codeElement xmi:id=&quot;id.55&quot; xmi:type=&quot;code:PointerType&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101544"></A>              &lt;itemUnit xmi:id=&quot;id.56&quot; type=&quot;id.23&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101545"></A>                &lt;codeRelation xmi:id=&quot;id.57&quot; xmi:type=&quot;code:HasType&quot; to=&quot;id.23&quot; from=&quot;id.56&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101546"></A>              &lt;/itemUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101547"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101548"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101549"></A>          &lt;codeElement xmi:id=&quot;id.58&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101550"></A>            &lt;actionRelation xmi:id=&quot;id.59&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.38&quot; from=&quot;id.58&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101551"></A>            &lt;actionRelation xmi:id=&quot;id.60&quot; xmi:type=&quot;action:Addresses&quot; to=&quot;id.7&quot; from=&quot;id.58&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101552"></A>            &lt;actionRelation xmi:id=&quot;id.61&quot; xmi:type=&quot;action:CompliesTo&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101673"></A>				to=&quot;id.47&quot; from=&quot;id.58&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101553"></A>            &lt;actionRelation xmi:id=&quot;id.62&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.63&quot; from=&quot;id.58&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101554"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101555"></A>          &lt;codeElement xmi:id=&quot;id.63&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a2&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101556"></A>            &lt;actionRelation xmi:id=&quot;id.64&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.38&quot; from=&quot;id.63&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101557"></A>            &lt;actionRelation xmi:id=&quot;id.65&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101674"></A>				to=&quot;id.52&quot; from=&quot;id.63&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101558"></A>            &lt;actionRelation xmi:id=&quot;id.66&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.67&quot; from=&quot;id.63&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101559"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101560"></A>          &lt;codeElement xmi:id=&quot;id.67&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a3&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101561"></A>            &lt;actionRelation xmi:id=&quot;id.68&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.38&quot; from=&quot;id.67&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101562"></A>            &lt;actionRelation xmi:id=&quot;id.69&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101675"></A>				to=&quot;id.56&quot; from=&quot;id.67&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101563"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101564"></A>          &lt;codeElement xmi:id=&quot;id.70&quot; xmi:type=&quot;action:BlockUnit&quot; name=&quot;bi2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101565"></A>            &lt;codeElement xmi:id=&quot;id.71&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101676"></A>				name=&quot;i3&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101566"></A>              &lt;actionRelation xmi:id=&quot;id.72&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.20&quot; from=&quot;id.71&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101567"></A>              &lt;actionRelation xmi:id=&quot;id.73&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.50&quot; from=&quot;id.71&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101568"></A>              &lt;actionRelation xmi:id=&quot;id.74&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.79&quot; from=&quot;id.71&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101569"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101570"></A>            &lt;codeElement xmi:id=&quot;id.75&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;i4&quot; kind=&quot;New&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101571"></A>              &lt;actionRelation xmi:id=&quot;id.76&quot; xmi:type=&quot;action:Creates&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101677"></A>				to=&quot;id.23&quot; from=&quot;id.75&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101572"></A>              &lt;actionRelation xmi:id=&quot;id.77&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.54&quot; from=&quot;id.75&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101573"></A>              &lt;actionRelation xmi:id=&quot;id.78&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.79&quot; from=&quot;id.75&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101574"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101575"></A>            &lt;codeElement xmi:id=&quot;id.79&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101678"></A>				name=&quot;i5&quot; kind=&quot;MethodCall&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101576"></A>              &lt;actionRelation xmi:id=&quot;id.80&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.85&quot; from=&quot;id.79&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101577"></A>              &lt;actionRelation xmi:id=&quot;id.81&quot; xmi:type=&quot;action:Addresses&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101679"></A>				to=&quot;id.54&quot; from=&quot;id.79&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101578"></A>              &lt;actionRelation xmi:id=&quot;id.82&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.25&quot; from=&quot;id.79&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101579"></A>              &lt;actionRelation xmi:id=&quot;id.83&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.56&quot; from=&quot;id.79&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101580"></A>              &lt;actionRelation xmi:id=&quot;id.84&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.58&quot; from=&quot;id.79&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101581"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101582"></A>            &lt;codeElement xmi:id=&quot;id.85&quot; xmi:type=&quot;code:Value&quot; name=&quot;3&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101583"></A>            &lt;actionRelation xmi:id=&quot;id.86&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.71&quot; from=&quot;id.70&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101584"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101585"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101586"></A>        &lt;codeElement xmi:id=&quot;id.87&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;bi3&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101587"></A>          &lt;entryFlow xmi:id=&quot;id.88&quot; to=&quot;id.89&quot; from=&quot;id.87&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101588"></A>          &lt;codeElement xmi:id=&quot;id.89&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;i6&quot; kind=&quot;Call&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101589"></A>            &lt;actionRelation xmi:id=&quot;id.90&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.93&quot; from=&quot;id.89&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101590"></A>            &lt;actionRelation xmi:id=&quot;id.91&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.25&quot; from=&quot;id.89&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101591"></A>            &lt;actionRelation xmi:id=&quot;id.92&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.52&quot; from=&quot;id.89&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101592"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101593"></A>          &lt;codeElement xmi:id=&quot;id.93&quot; xmi:type=&quot;code:Value&quot; name=&quot;2&quot; type=&quot;id.105&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101594"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101595"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101596"></A>      &lt;codeElement xmi:id=&quot;id.94&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;bi4&quot; kind=&quot;unknown&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101597"></A>        &lt;entryFlow xmi:id=&quot;id.95&quot; to=&quot;id.96&quot; from=&quot;id.94&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101598"></A>        &lt;codeElement xmi:id=&quot;id.96&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;i7&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101599"></A>          &lt;actionRelation xmi:id=&quot;id.97&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.10&quot; from=&quot;id.96&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101600"></A>          &lt;actionRelation xmi:id=&quot;id.98&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.99&quot; from=&quot;id.96&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101601"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101602"></A>        &lt;codeElement xmi:id=&quot;id.99&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;i8&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101603"></A>          &lt;actionRelation xmi:id=&quot;id.100&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.87&quot; from=&quot;id.99&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101604"></A>          &lt;actionRelation xmi:id=&quot;id.101&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.102&quot; from=&quot;id.96&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101605"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101606"></A>        &lt;codeElement xmi:id=&quot;id.102&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;i9&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101607"></A>          &lt;actionRelation xmi:id=&quot;id.103&quot; xmi:type=&quot;action:Calls&quot; to=&quot;id.48&quot; from=&quot;id.102&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101608"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101609"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101610"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101611"></A>    &lt;codeElement xmi:id=&quot;id.104&quot; xmi:type=&quot;code:LanguageUnit&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101612"></A>      &lt;codeElement xmi:id=&quot;id.105&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;int&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101613"></A>      &lt;codeElement xmi:id=&quot;id.106&quot; xmi:type=&quot;code:CallableUnit&quot; name=&quot;printf&quot; type=&quot;id.107&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101614"></A>        &lt;codeElement xmi:id=&quot;id.107&quot; xmi:type=&quot;code:Signature&quot; name=&quot;printf&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101615"></A>          &lt;parameterUnit xmi:id=&quot;id.108&quot; type=&quot;id.105&quot; kind=&quot;return&quot; pos=&quot;0&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101616"></A>          &lt;parameterUnit xmi:id=&quot;id.109&quot; name=&quot;format&quot; type=&quot;id.111&quot; pos=&quot;1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101617"></A>          &lt;parameterUnit xmi:id=&quot;id.110&quot; name=&quot;arguments&quot; type=&quot;id.112&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1101680"></A>			kind=&quot;variadic&quot; pos=&quot;2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101618"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101619"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101620"></A>      &lt;codeElement xmi:id=&quot;id.111&quot; xmi:type=&quot;code:StringType&quot; name=&quot;char *&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101621"></A>      &lt;codeElement xmi:id=&quot;id.112&quot; xmi:type=&quot;code:VoidType&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101622"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101623"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101624"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1101466"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094641"></A><A NAME="_Toc131848275"></A>ClassRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1094642"></A>The ClassRelations class diagram defines meta-model elements that represent semantic associations between datatypes. The classes and associations of the ClassRelations diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#96726" CLASS="XRef">See - ClassRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1094649"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-18.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094651"></A><A NAME="96726"></A>- ClassRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094653"></A><A NAME="_Toc131848276"></A>Extends Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1094654"></A>The Extends is a specific meta-model element that represents semantic relation between two classes, where one class (called a &quot;child&quot; class) extends another class (called its &quot;parent&quot; class) through inheritance, common to object-oriented languages. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094656"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1094657"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094658"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1094668"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094661"></A>from:Datatype[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094663"></A>The child Class </P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1094665"></A>to:Datatype[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1094667"></A>The parent Class </P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1094669"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094670"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1101728"></A>The from- and to- endpoints should be different</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1094671"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101717"></A>Extends relationship represents the associations between two datatypes in which the first datatype (called the &quot;child&quot; class) &quot;subclasses&quot; the second datatype (called the &quot;parent&quot; class) by inheriting the semantics and owned elements of the parent class.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1094417"></A>&nbsp;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1093056"></A>&nbsp;</P>
<P CLASS="Header">
<A NAME="pgfId-1094087"></A>Code Elements representing Preprocessor Directives</P>
<P CLASS="Body">
<A NAME="pgfId-1098629"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1098630"></A>A typical preprocessor allows the use of an embedded language in the source code written in some primary language. It is different than let's say an HTML/Javascript program or programs with embedded assembler routines where there is more than one language but those don't end up forming a modified version in a single language that is what gets compiled and executed (and that could be traced after, etc.). Example of the use of the preprocessor include Cobol copy replacing, Exec CICS, Exec SQL, 4GL user-defined language elements (such as MENTER macro/command in Dataflex). </P>
<P CLASS="Body">
<A NAME="pgfId-1098632"></A>The Exec SQL in Cobol example might be one of the best and easiest to look at. From a modeling/representation perspective the SQL statement itself is very much what we want to capture along with the various data elements and variable involved and their flow. However, an embedded SQL statement is expanded by the SQL pre-processor which generates some low-level code that will translate into a call to some library. By capturing this as generated code and correctly associating the elements, we can understand the program both from its SQL semantic, as well as from its execution realm. And our relationship between the &quot;SQL language&quot; elements to the &quot;native&quot; code elements that are generated is the glue tying things together. Trying to do the same analysis and operations by simply working with a couple of SourceRef would be very limiting indeed.</P>
<P CLASS="Body">
<A NAME="pgfId-1098634"></A>Preprocessor directive is a language/dialect on its own and it should be handled and treated as a first class citizen in KDM. However, the preprocessor support is an optional part of the code model, so that and the non-preprocessor-enabled L0 KDM tool can seamlessly ignore the embedded language and work only with the primary language. The implementer will have the choice to either: 1) represent the embedded language in KDM and ignore the primary code that results from expansion of some preprocessor directives (provided this can lead to a meaningful model); 2) ignore the embedded language and represent only the primary language in KDM; 3) represent both the embedded and the generated primary code and relations between the two. In order to achieve this goal, KDM modeling framework provides a strong separation between embedded language representation and primary language representation.</P>
<P CLASS="Body">
<A NAME="pgfId-1098636"></A>Preprocessor support in KDM allows conveying information that a certain code element appeared as the result of 1) being originally coded in the primary language; b) being included from another file by a preprocessor; c) being generated by a preprocessor as an expansion of an embedded language directive; d) being selected by satisfying appropriate conditions by the preprocessor.</P>
<P CLASS="Body">
<A NAME="pgfId-1098638"></A>KDM provides the following modeling elements for representing preprocessor directives:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1098640"></A>PreprocessorDirective - representation of a generic preprocessor directive and a superclass for several other concrete preprocessor directives. </LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1098641"></A>MacroUnit -representation of macro definitions</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1098642"></A>MacroDirective - representation of an embedded language construct as distinguishable from the primary language construct. This is also known as a Macro Call.</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1098643"></A>IncludeDirective - representation of an include directive of a preprocessor.</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1098644"></A>ConditionalDirective - representation of a pre-processor conditional branch</LI>
</UL>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1094269"></A>Preprocessor Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1098657"></A>The Preprocessor class diagram defines the meta-model elements to represent embedded language constructs and to support common modeling situations resulting from the use of a language preprocessor (for example, preprocessor defined as part of the C language, or the preprocessing capabilities of Cobol).</P>
<P CLASS="Body">
<A NAME="pgfId-1094270"></A>The class diagram in <A HREF="KDM_1.0_12_codepkg.htm#83413" CLASS="XRef">See - Preprocessor Class Diagram.</A> shows these classes and their associations.</P>
<P CLASS="Body">
<A NAME="pgfId-1094278"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-19.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1094280"></A><A NAME="83413"></A>- Preprocessor Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1094282"></A><A NAME="_Toc131848224"></A>PreprocessorDirective Class (generic)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1098702"></A>PreprocessorDirective is a generic meta-model element that represents preprocessor directives common to some programming languages (for example, the C language preprocessor capabilities). This class is extended by several concrete meta-model elements that represent several key directive types common to language preprocessors. KDM representations of existing systems are expected to use concrete subclasses of PreprocessorDirective, however this class itself is a concrete meta-model element and can be used as an extended element with an appropriate stereotype to represent other types of preprocessing directives not covered by the standard subclasses. Semantics of preprocessor directives in KDM is described later in this section.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098801"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1098802"></A>AbstractCodeElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101736"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1101742"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1101739"></A>codeElement:AbstractCodeElement[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1101741"></A>this optional code element represents the content of the preprocessor directive</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098707"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1098708"></A>	PreprocessorDirective should have a stereotype</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098845"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099057"></A>From the KDM perspective, each preprocessor directive (an embedded language statement) is a container for code elements (possibly empty). KDM preprocessor support does not define any further special elements for semantic-rich representation of the embedded language directives. This is up to the implementer. The macro declaration is just code written for example in the &quot;Cpreprocessor&quot; language and can be represented using standard KDM constructs, such as CodeElements, Action, Flow etc., if needed or light-weight extension elements, like Stereotypes and ExtendedValues. In many situations, the right implementation choice is to leave the directive as an empty container with a name, and likely, a SourceRef with a code snippet.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099059"></A>It is possible to provide a high-fidelity semantic-rich representation of the preprocessor directives themselves (for example, parameters to MacroUnit, the body of the MacroUnit as CodeElements, conditional compilation expressions as KDM micro actions and flows) however in most situations this is inadequate. Besides, since many preprocessors operate at the level of lexical tokens or below, the representation of the body of the MacroUnit may not be adequate at the level of the CodeModel. In many situations, only the resulting code in the primary language can be interpreted semantically and represented as meaningful KDM CodeElements. Relationship Alternative is a practical approximation of a more precise description of the flow between the alternative branches of the conditional compilation directive. Example to this section only illustrate a simplified approach.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099061"></A>&quot;Generated&quot; code (code in the primary language that results from executing the preprocessor directives) is owned by a BlockUnit. There is a relation GeneratedFrom from the entire BlockUnit to the corresponding pre-processor directive. It is recommended that the generated code has a SourceRef with a snippet, since it is not present in the original source file and can not be referred to using the SourceRegion construct.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099063"></A>&quot;Included&quot; code (code in the primary language that results from executing the pre-processor include directive) is also owned by a BlockUnit. There is a relation GeneratedFrom from the entire BlockUnit to the corresponding pre-processor directive. From the logical perspective, the contents of an included file are owned by a certain SharedUnit. KDM does not restrict implementers whether to clone the included code elements or to reuse them and keep a single copy in the SharedUnit. However, many KDM implementations will usually clone the elements of the SharedUnit.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099065"></A>The implementer of KDM has the following implementation choices:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1099066"></A>ignore the embedded language constructs, represent original and generated primary code; the resulting KDM does not contain any pre-processor directives, and relationships expands and alternative; information about the embedded language can not be recovered from the KDM representation;</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1099068"></A>ignore the generated primary code, provide a high-fidelity representation to the embedded construct; the embedded construct is the origin and the target of KDM relationships; some details of how the embedded construct is expanded into the primary code may not be recovered from the KDM representation (but in general, the embedded construct provides a better representation, since it is the view that developers have)</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1099070"></A>represent both the embedded constructs and the primary code, provide a high-fidelity representation only to the primary code; there is a BlockUnit that owns the generated code, the generated code is the origin and the target of KDM relationships; there are no KDM relations to and from the embedded construct (other than Expands and Alternative); there is an GeneratedFrom relation from the entire BlockUnit to the corresponding embedded construct;</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1099072"></A>represent both the embedded constructs and the primary code, provide the high fidelity representation to the embedded construct: there is a BlockUnit that owns the generated code, the embedded construct is the origin and the target of KDM relationships; there are no KDM relationships to and from the BlockUnit representing the generated code (but there may be some local relationships inside the BlockUnit); there is an GeneratedFrom relation from the entire BlockUnit to the corresponding embedded construct;</LI>
</UL>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098710"></A>MacroUnit class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1098712"></A>MacroUnit class represents macro definitions common to several programming languages. Although KDM allows semantic-rich contents of MacroUnit (as it is a subclass of a ControlElement), usually it is sufficient to represent a macro definition only as a names KDM element that can be the target of special Expands relations, so that its usage in the primary code as well as in other macro definitions can be tracked. The kind attribute provides some additional semantic information about the macro definition. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098714"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098715"></A>PreprocessorDirective	</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098988"></A>Attributes</H6>
<P CLASS="Body">
<A NAME="pgfId-1098994"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098991"></A>kind:MacroKind</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098993"></A>additional semantic properties of the macro definition</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1098833"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098834"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101778"></A>Semantics:</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101779"></A>MacroUnit represents a preprocessor directive which defines a named rule for generating code, usually in the form of a macrodefinition, possible with the parameters and the body, where the occurrence of the name of the macro with the actual parameters is substituted by the body of the macro definition. KDM does not explicitly represent parameters to the macro directive or the body of the macro definition, since the granularity of these objects is usually related to string manipulation. However, the optional owned code element may be used to represent these. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1098719"></A>It is the implementer's responsibility to select particular strategy to representing macro units.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098720"></A>MacroKind data type (enumeration)</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1098722"></A>MacroKind enumeration datatype describes several semantic classes of MacroUnits.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098724"></A>Literal Value</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098725"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098893"></A>regular</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098928"></A>macro definition has a body and may have parameters</P>
<P CLASS="TableText1">
<A NAME="pgfId-1098895"></A>&nbsp;</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098916"></A>option</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098918"></A>macro definition without a body and parameters, only a name</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098912"></A>undefined</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="paragraph">
<A NAME="pgfId-1098952"></A>this value represents an undefined macro as the target for some relations in the representation of default branches of conditional compilation and variants</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098908"></A>external</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098910"></A>external compilation option</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098904"></A>unknown</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098906"></A>unknown class of a macro definition</P>
</TD>
</TR>
</TABLE>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098732"></A>MacroDirective class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1098734"></A>MacroDirective class represents the so-called &quot;macro call&quot;, the occurrence of a macro name (possible with parameters) in the primary code, such that the preprocessor recognizes it and &quot;expands&quot; by substituting the macro directive construct with its &quot;definition&quot;. A block of &quot;generated&quot; code elements which represent the primary code resulting from macro expansion may be associated with the MacroDirective. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098736"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098737"></A>PreprocessorDirective</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101791"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098738"></A>MacroDirective represents the so-called &quot;macrocall&quot;, or an occurrence of a macro name (possibly with the actual parameters) which is substituted by the body of the macro definition in which the occurrences of the formal parameters are substituted by the corresponding actual parameters. A MacroDirective can own an optional action element as the origin of the action relationships to the actual parameters to the MacroDirective.</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098739"></A>IncludeDirective class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1099018"></A>IncludeDirective class represents the so-called include directive, common to several programming languages and their preprocessors (for example, the COPY statement in Cobol, the #include directive in the C language). The include directive is usually related to a SharedUnit (for example, a copybook in Cobol, or a header file in C). A block of &quot;included&quot; code elements which are the clones of the elements owned by the SharedUnit may be associated with the include directive. Semantics of the IncludeDirective class is described later in this section in more detail.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098740"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098741"></A>PreprocessorDirective</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101810"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101805"></A>IncludeDirective represents a preprocessor directive which is related to copying the content of some SharedUnit into a stand-alone CompilationUnit.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1098742"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098745"></A>Conditional Directive class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1098747"></A>ConditionalDirective class represents the so-called &quot;variant&quot; of a software system, resulting from the use of conditional compilation capabilities, common to several programming languages and their preprocessors (for example the #if ... #endif and #ifdef ... #endif directives of the preprocessor of the C language). ConditionalDirective represents a single &quot;branch&quot; of the conditional compilation construct. A block of &quot;conditional&quot; code elements which represent the elements of this particular variant that were selected for compilation may be associated with the conditional directive. Semantics of the ConditionalDirective class is described later in this section in more detail.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098749"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099132"></A>PreprocessorDirective</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101819"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1101813"></A>Conditional directive identifies a variant of the software system within a software product line which is controlled by the so-called conditional compilation. Conditional directive determines a block of &quot;generated&quot; code, corresponding to the selected variant. The block of &quot;generated&quot; code identifies the corresponding conditional directive.   </P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1099138"></A>PreprocessorRelations class diagram</H3>
<P CLASS="paragraph">
<A NAME="pgfId-1099140"></A>The Preprocessor class diagram defines several concrete relationships types for the KDM support of embedded language constructs and pre-processor directives, common to several programming languages. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1099142"></A>The classes and associations of the PreprocessorRelations class diagram are shown at <A HREF="KDM_1.0_12_codepkg.htm#25422" CLASS="XRef">See - PreprocessorRelations Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1099161"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-20.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1099163"></A><A NAME="25422"></A>- PreprocessorRelations Class Diagram</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099171"></A>&nbsp;</P>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1099247"></A>Expands class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1099173"></A>Expands class represents the relationship between a MacroUnit to another MacroUnit or from a MacroDirective to a MacroUnit. This relationship results from using the name of the target macro definition in the context of the origin MacroUnit or MacroDirective.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099174"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099253"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099407"></A>Associations				</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099417"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099410"></A>to:MacroUnit[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099412"></A>the target MacroUnit</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099414"></A>from:PreprocessorDirective[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099416"></A>the origin context in which the MacroUnit is used</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101829"></A>Semantics:</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099421"></A>It is the implementer's responsibility to identify and represent associations between MacroUnits, as well as a MacroDirective and the corresponding MacroUnit according to the semantics of the preprocessor. See general description of the Preprocessor support for the implementer guidelines.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1102184"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1102185"></A>GeneratedFrom class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1102186"></A>GeneratedFrom class represents the relationship between a block of code elements that were not originally produced by the developers, but were produced by the preprocessor as the result of processing a certain preprocessor directive. In particular, according to the level of granularity selected in KDM, aligned with the concrete subclasses of the PreprocessorDirective class, the resulting code may represent one of the following:</P>
<UL>
<LI CLASS="Bullet1">
<A NAME="pgfId-1102187"></A>&quot;generated&quot; code that corresponds to a certain MacroDirective</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1102188"></A>&quot;included: code that corresponds to a certain IncludeDirective</LI>
<LI CLASS="Bullet1">
<A NAME="pgfId-1102189"></A>&quot;conditional&quot; code that was selected as a particular &quot;variant&quot; of a software product line with conditional compilation</LI>
</UL>
<P CLASS="paragraph">
<A NAME="pgfId-1102190"></A>GeneratedFrom relationship originates from the entire BlockUnit that owns the &quot;generated&quot; code and target the corresponding PreprocessorDirective. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102191"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102192"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102193"></A>Associations</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102203"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102196"></A>to:PreprocessorDirective[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102198"></A>a subclass of a PreprocessorDirective class that represent the preprocessor directive that was involved in producing the code</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102200"></A>from:AbstractCodeElement[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102202"></A>The BlockUnit that owns the &quot;generated&quot; code</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102204"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1102205"></A>	The origin of the GeneratedFrom relationship should be an BlockUnit</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102321"></A>Semantics:</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102206"></A>See the general description of the preprocessor directives for the implementer's guidelines.</P>
<P CLASS="paragraph">
<A NAME="pgfId-1102182"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1101836"></A>Example (C preprocessor):</H6>
<P CLASS="example">
<A NAME="pgfId-1101950"></A>#define GT(A,B) ((A) &gt; (B))</P>
<P CLASS="example">
<A NAME="pgfId-1101951"></A>#define GMAX(A,B)  g=( GT(A,B) ? (A) : (B))</P>
<P CLASS="example">
<A NAME="pgfId-1101953"></A>GMAX(p+q, r+s );</P>
<P CLASS="example">
<A NAME="pgfId-1102057"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1102058"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1101963"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101964"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102039"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102040"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102041"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102042"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Macro Directive Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101965"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101966"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:CompilationUnit&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101967"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;GMAX&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101968"></A>        &lt;source language=&quot;Cpreprocessor&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102043"></A>			snippet=&quot;#define GMAX(A,B) g=( GT(A,B) ? (A) : (B) )&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101969"></A>        &lt;codeRelation xmi:id=&quot;id.3&quot; xmi:type=&quot;code:Expands&quot; to=&quot;id.4&quot; from=&quot;id.2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101970"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101971"></A>      &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;GT&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101972"></A>        &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#define GT(A,B) ((A) &gt; (B))&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101973"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101974"></A>      &lt;codeElement xmi:id=&quot;id.5&quot; xmi:type=&quot;action:BlockUnit&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101975"></A>        &lt;codeElement xmi:id=&quot;id.6&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;p&quot; type=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101976"></A>        &lt;codeElement xmi:id=&quot;id.7&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;q&quot; type=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101977"></A>        &lt;codeElement xmi:id=&quot;id.8&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;r&quot; type=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101978"></A>        &lt;codeElement xmi:id=&quot;id.9&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;s&quot; type=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101979"></A>        &lt;codeElement xmi:id=&quot;id.10&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;g&quot; type=&quot;id.49&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101980"></A>        &lt;codeElement xmi:id=&quot;id.11&quot; xmi:type=&quot;code:MacroDirective&quot; name=&quot;m1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101981"></A>          &lt;source xmi:id=&quot;id.12&quot; language=&quot;Cpreprocessor&quot; snippet=&quot;GMAX(p+q,r+s);&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101982"></A>          &lt;codeRelation xmi:id=&quot;id.13&quot; xmi:type=&quot;code:Expands&quot; to=&quot;id.2&quot; from=&quot;id.11&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101983"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101984"></A>        &lt;codeElement xmi:id=&quot;id.14&quot; xmi:type=&quot;action:BlockUnit&quot; name=&quot;bm1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101985"></A>          &lt;codeRelation xmi:id=&quot;id.15&quot; xmi:type=&quot;code:GeneratedFrom&quot; to=&quot;id.11&quot; from=&quot;id.14&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101986"></A>          &lt;codeElement xmi:id=&quot;id.16&quot; xmi:type=&quot;action:ActionElement&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101987"></A>            &lt;source xmi:id=&quot;id.17&quot; language=&quot;C&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102044"></A>			snippet=&quot;g=( ((p+q) &gt; (r+s)) ? (p+q) : (r+s) );&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101988"></A>            &lt;codeElement xmi:id=&quot;id.18&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot; kind=&quot;Add&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101989"></A>              &lt;actionRelation xmi:id=&quot;id.19&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.6&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101990"></A>              &lt;actionRelation xmi:id=&quot;id.20&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.10&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101991"></A>              &lt;actionRelation xmi:id=&quot;id.21&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.47&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101992"></A>              &lt;actionRelation xmi:id=&quot;id.22&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.23&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101993"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101994"></A>            &lt;codeElement xmi:id=&quot;id.23&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a2&quot; kind=&quot;Add&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101995"></A>              &lt;actionRelation xmi:id=&quot;id.24&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.8&quot; from=&quot;id.23&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101996"></A>              &lt;actionRelation xmi:id=&quot;id.25&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.9&quot; from=&quot;id.23&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101997"></A>              &lt;actionRelation xmi:id=&quot;id.26&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.48&quot; from=&quot;id.23&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101998"></A>              &lt;actionRelation xmi:id=&quot;id.27&quot; xmi:type=&quot;action:Flow&quot; from=&quot;id.23&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1101999"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102000"></A>            &lt;codeElement xmi:id=&quot;id.28&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102045"></A>			name=&quot;a3&quot; kind=&quot;GreaterThan&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102001"></A>              &lt;codeElement xmi:id=&quot;id.29&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102046"></A>			name=&quot;c&quot; type=&quot;id.50&quot; kind=&quot;register&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102002"></A>              &lt;actionRelation xmi:id=&quot;id.30&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.47&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102003"></A>              &lt;actionRelation xmi:id=&quot;id.31&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.48&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102004"></A>              &lt;actionRelation xmi:id=&quot;id.32&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.29&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102005"></A>              &lt;actionRelation xmi:id=&quot;id.33&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.34&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102006"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102007"></A>            &lt;codeElement xmi:id=&quot;id.34&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102047"></A>			name=&quot;a3.1&quot; kind=&quot;Condition&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102008"></A>              &lt;actionRelation xmi:id=&quot;id.35&quot; xmi:type=&quot;action:Reads&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102048"></A>				to=&quot;id.29&quot; from=&quot;id.34&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102009"></A>              &lt;actionRelation xmi:id=&quot;id.36&quot; xmi:type=&quot;action:TrueFlow&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102049"></A>				to=&quot;id.38&quot; from=&quot;id.28&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102010"></A>              &lt;actionRelation xmi:id=&quot;id.37&quot; xmi:type=&quot;action:FalseFlow&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102050"></A>				to=&quot;id.42&quot; from=&quot;id.34&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102011"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102012"></A>            &lt;codeElement xmi:id=&quot;id.38&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102051"></A>				name=&quot;a4&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102013"></A>              &lt;actionRelation xmi:id=&quot;id.39&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.47&quot; from=&quot;id.38&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102014"></A>              &lt;actionRelation xmi:id=&quot;id.40&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.10&quot; from=&quot;id.38&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102015"></A>              &lt;actionRelation xmi:id=&quot;id.41&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.46&quot; from=&quot;id.38&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102016"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102017"></A>            &lt;codeElement xmi:id=&quot;id.42&quot; xmi:type=&quot;action:ActionElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102052"></A>				name=&quot;a5&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102018"></A>              &lt;actionRelation xmi:id=&quot;id.43&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.48&quot; from=&quot;id.42&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102019"></A>              &lt;actionRelation xmi:id=&quot;id.44&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.7&quot; from=&quot;id.42&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102020"></A>              &lt;actionRelation xmi:id=&quot;id.45&quot; xmi:type=&quot;action:Flow&quot; to=&quot;id.46&quot; from=&quot;id.42&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102021"></A>            &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102022"></A>            &lt;codeElement xmi:id=&quot;id.46&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a6&quot; kind=&quot;Nop&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102023"></A>            &lt;codeElement xmi:id=&quot;id.47&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102053"></A>				name=&quot;t1&quot; type=&quot;id.49&quot; kind=&quot;register&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102024"></A>            &lt;codeElement xmi:id=&quot;id.48&quot; xmi:type=&quot;code:StorableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102054"></A>				name=&quot;t2&quot; type=&quot;id.49&quot; kind=&quot;register&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102025"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102026"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102027"></A>        &lt;codeElement xmi:id=&quot;id.49&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;int&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102028"></A>        &lt;codeElement xmi:id=&quot;id.50&quot; xmi:type=&quot;code:BooleanType&quot; name=&quot;boolean&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102029"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102030"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102031"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102032"></A>&lt;/kdm:Segment&gt;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1099190"></A>Includes class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1099192"></A>Includes class represents the relationship from an IncludeDirective to a SharedUnit that represents the code elements being included.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099291"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099292"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099194"></A>Associations</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099197"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099457"></A>from:AbstractCodeElement[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099459"></A>the code elements being included (usually a SharedUnit) </P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099461"></A>from:PreprocessorDirective[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099463"></A>the IncludeDirective class that represents the include directive</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099198"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1099199"></A>	The origin of the Includes relationship should be an IncludeDirective</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102222"></A>Semantics:</H6>
<P CLASS="Body">
<A NAME="pgfId-1102213"></A>It is the implementer's responsibility to identify and represent include relationships according to the semantics of the particular preprocessor.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102229"></A>Example (C preprocessor):</H6>
<P CLASS="example">
<A NAME="pgfId-1102292"></A>/*---a.h---*/</P>
<P CLASS="example">
<A NAME="pgfId-1102293"></A>... c1 ...</P>
<P CLASS="example">
<A NAME="pgfId-1102294"></A>...c2... </P>
<P CLASS="example">
<A NAME="pgfId-1102295"></A>/*---a.c---*/</P>
<P CLASS="example">
<A NAME="pgfId-1102296"></A>#include &quot;a.h&quot;</P>
<P CLASS="example">
<A NAME="pgfId-1102300"></A>...c1...</P>
<P CLASS="example">
<A NAME="pgfId-1102301"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1102312"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1102235"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102236"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102284"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102285"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102286"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102287"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Include Directive Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102237"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102238"></A>    &lt;extensionFamily xmi:id=&quot;id.1&quot; &gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102239"></A>      &lt;stereotype xmi:id=&quot;id.2&quot; name=&quot;sample&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102240"></A>    &lt;/extensionFamily&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102241"></A>    &lt;codeElement xmi:id=&quot;id.3&quot; xmi:type=&quot;code:SharedUnit&quot; name=&quot;a.h&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102242"></A>      &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:CodeElement&quot; stereotype=&quot;id.2&quot; name=&quot;c1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102243"></A>        &lt;source xmi:id=&quot;id.5&quot; language=&quot;C&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102244"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102245"></A>      &lt;codeElement xmi:id=&quot;id.6&quot; xmi:type=&quot;code:CodeElement&quot; stereotype=&quot;id.2&quot; name=&quot;c2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102246"></A>        &lt;source xmi:id=&quot;id.7&quot; language=&quot;C&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102247"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102248"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102249"></A>    &lt;codeElement xmi:id=&quot;id.8&quot; xmi:type=&quot;code:CompilationUnit&quot; name=&quot;a.c&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102250"></A>      &lt;codeElement xmi:id=&quot;id.9&quot; xmi:type=&quot;code:IncludeDirective&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102251"></A>        &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#include &amp;quot;a.h&amp;quot;&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102252"></A>        &lt;codeRelation xmi:id=&quot;id.10&quot; xmi:type=&quot;code:Includes&quot; to=&quot;id.3&quot; from=&quot;id.9&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102253"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102254"></A>      &lt;codeElement xmi:id=&quot;id.11&quot; xmi:type=&quot;action:BlockUnit&quot; name=&quot;b1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102255"></A>        &lt;codeRelation xmi:id=&quot;id.12&quot; xmi:type=&quot;code:GeneratedFrom&quot; to=&quot;id.9&quot; from=&quot;id.11&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102256"></A>        &lt;codeElement xmi:id=&quot;id.13&quot; xmi:type=&quot;code:CodeElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102288"></A>		stereotype=&quot;id.2&quot; name=&quot;c1_clone&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102257"></A>          &lt;source xmi:id=&quot;id.14&quot; language=&quot;C&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102258"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102259"></A>        &lt;codeElement xmi:id=&quot;id.15&quot; xmi:type=&quot;code:CodeElement&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102289"></A>		stereotype=&quot;id.2&quot; name=&quot;c2_clone&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102260"></A>          &lt;source xmi:id=&quot;id.16&quot; language=&quot;C&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102261"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102262"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102263"></A>      &lt;codeElement xmi:id=&quot;id.17&quot; xmi:type=&quot;action:BlockUnit&quot; name=&quot;b2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102264"></A>        &lt;codeElement xmi:id=&quot;id.18&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102265"></A>          &lt;actionRelation xmi:id=&quot;id.19&quot; xmi:type=&quot;action:ActionRelationship&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102290"></A>			to=&quot;id.13&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102266"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102267"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102268"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102269"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102270"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="Body">
<A NAME="pgfId-1102227"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1099217"></A>VariantTo class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1099219"></A>VariantTo class represents the relationship between variants of a software product line with conditional compilation. This relationship connects the ConditionalDirective to each alternative branch of the conditional compilation directive. KDM representation are expected to identify a single &quot;default&quot; variant, to which additional variants are alternatives. There is no VariantTo relationship to the &quot;default&quot; variant, only to the alternative ones. Each variant is expected to contain relationship GeneratedFrom connecting it to the corresponding ConditionalDirective. The &quot;default&quot; variant is expected to have a VariantTo relationship to every alternative branch.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099301"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099302"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099221"></A>Associations</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099224"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099528"></A>to:PreprocessorDirective[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099530"></A>ConditionalDirective class that represent an alternative variant of the conditional</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099532"></A>from:PreprocessorDirective[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099534"></A>a ConditionalDirective class that represent the default variant of the conditional</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099225"></A>Constraints:</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1099226"></A>	The origin of the VariantTo relationship should be an ConditionalDirective</H6>
<OL>
<LI CLASS="List1-">
<A NAME="pgfId-1099227"></A>	The target of the VariantTo relationship should be an ConditionalDirective</LI>
</OL>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102348"></A>Semantics:</H6>
<P CLASS="Body">
<A NAME="pgfId-1102329"></A>It is the implementer's responsibility to identify and represent the variants and associations between the &quot;generated&quot; code and the corresponding conditional directive according to the semantics of the preprocessor. See the general description of the preprocessor directive support and the implementer guidelines.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102355"></A>Example (C preprocessor):</H6>
<P CLASS="example">
<A NAME="pgfId-1102433"></A>#define UNIX 1</P>
<P CLASS="example">
<A NAME="pgfId-1102434"></A>#if UNIX | DEBUG</P>
<P CLASS="example">
<A NAME="pgfId-1102435"></A>g=1;</P>
<P CLASS="example">
<A NAME="pgfId-1102436"></A>#endif</P>
<P CLASS="example">
<A NAME="pgfId-1102437"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1102438"></A>Ifdef UNIX</P>
<P CLASS="example">
<A NAME="pgfId-1102439"></A>g=1</P>
<P CLASS="example">
<A NAME="pgfId-1102440"></A>#else</P>
<P CLASS="example">
<A NAME="pgfId-1102441"></A>g=2</P>
<P CLASS="example">
<A NAME="pgfId-1102442"></A>#endif</P>
<P CLASS="paragraph">
<A NAME="pgfId-1102431"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1102361"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102362"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102427"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102428"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102429"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102430"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Variants Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102363"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102364"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;UNIX&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102365"></A>      &lt;source language=&quot;Cproprocessor&quot; snippet=&quot;#define UNIX 1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102366"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102367"></A>    &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;DEBUG&quot; kind=&quot;external&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102368"></A>    &lt;codeElement xmi:id=&quot;id.3&quot; xmi:type=&quot;code:StorableUnit&quot; name=&quot;g&quot; type=&quot;id.4&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102369"></A>      &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:IntegerType&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102370"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102371"></A>    &lt;codeElement xmi:id=&quot;id.5&quot; xmi:type=&quot;code:ConditionalDirective&quot; name=&quot;c1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102372"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#if UNIX | DEBUG&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102373"></A>      &lt;codeRelation xmi:id=&quot;id.6&quot; xmi:type=&quot;code:Expands&quot; to=&quot;id.1&quot; from=&quot;id.5&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102374"></A>      &lt;codeRelation xmi:id=&quot;id.7&quot; xmi:type=&quot;code:Expands&quot; to=&quot;id.2&quot; from=&quot;id.5&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102375"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102376"></A>    &lt;codeElement xmi:id=&quot;id.8&quot; xmi:type=&quot;action:BlockUnit&quot; name=&quot;b1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102377"></A>      &lt;codeRelation xmi:id=&quot;id.9&quot; xmi:type=&quot;code:GeneratedFrom&quot; to=&quot;id.5&quot; from=&quot;id.8&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102378"></A>      &lt;codeElement xmi:id=&quot;id.10&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102379"></A>        &lt;source xmi:id=&quot;id.11&quot; language=&quot;C&quot; snippet=&quot;g=123&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102380"></A>        &lt;codeElement xmi:id=&quot;id.12&quot; xmi:type=&quot;code:Value&quot; name=&quot;123&quot; type=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102381"></A>        &lt;actionRelation xmi:id=&quot;id.13&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.12&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102382"></A>        &lt;actionRelation xmi:id=&quot;id.14&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.3&quot; from=&quot;id.10&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102383"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102384"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102385"></A>    &lt;codeElement xmi:id=&quot;id.15&quot; xmi:type=&quot;code:ConditionalDirective&quot; name=&quot;c2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102386"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#ifdef UNIX&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102387"></A>      &lt;codeRelation xmi:id=&quot;id.16&quot; xmi:type=&quot;code:Expands&quot; to=&quot;id.1&quot; from=&quot;id.15&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102388"></A>      &lt;codeRelation xmi:id=&quot;id.17&quot; xmi:type=&quot;code:VariantTo&quot; to=&quot;id.25&quot; from=&quot;id.15&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102389"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102390"></A>    &lt;codeElement xmi:id=&quot;id.18&quot; xmi:type=&quot;action:BlockUnit&quot; name=&quot;b2&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102391"></A>      &lt;codeRelation xmi:id=&quot;id.19&quot; xmi:type=&quot;code:GeneratedFrom&quot; to=&quot;id.15&quot; from=&quot;id.18&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102392"></A>      &lt;codeElement xmi:id=&quot;id.20&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a2&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102393"></A>        &lt;source xmi:id=&quot;id.21&quot; language=&quot;C&quot; snippet=&quot;g=123&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102394"></A>        &lt;codeElement xmi:id=&quot;id.22&quot; xmi:type=&quot;code:Value&quot; name=&quot;1&quot; type=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102395"></A>        &lt;actionRelation xmi:id=&quot;id.23&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.22&quot; from=&quot;id.20&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102396"></A>        &lt;actionRelation xmi:id=&quot;id.24&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.3&quot; from=&quot;id.20&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102397"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102398"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102399"></A>    &lt;codeElement xmi:id=&quot;id.25&quot; xmi:type=&quot;code:ConditionalDirective&quot; name=&quot;c3&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102400"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#else&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102401"></A>      &lt;codeRelation xmi:id=&quot;id.26&quot; xmi:type=&quot;code:Expands&quot; to=&quot;id.1&quot; from=&quot;id.25&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102402"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102403"></A>    &lt;codeElement xmi:id=&quot;id.27&quot; xmi:type=&quot;action:BlockUnit&quot; name=&quot;b3&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102404"></A>      &lt;codeRelation xmi:id=&quot;id.28&quot; xmi:type=&quot;code:GeneratedFrom&quot; to=&quot;id.25&quot; from=&quot;id.27&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102405"></A>      &lt;codeElement xmi:id=&quot;id.29&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a3&quot; kind=&quot;Assign&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102406"></A>        &lt;source xmi:id=&quot;id.30&quot; language=&quot;C&quot; snippet=&quot;g=123&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102407"></A>        &lt;codeElement xmi:id=&quot;id.31&quot; xmi:type=&quot;code:Value&quot; name=&quot;2&quot; type=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102408"></A>        &lt;actionRelation xmi:id=&quot;id.32&quot; xmi:type=&quot;action:Reads&quot; to=&quot;id.31&quot; from=&quot;id.29&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102409"></A>        &lt;actionRelation xmi:id=&quot;id.33&quot; xmi:type=&quot;action:Writes&quot; to=&quot;id.3&quot; from=&quot;id.29&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102410"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102411"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102412"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102413"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="Body">
<A NAME="pgfId-1102353"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1102124"></A>Redefines class</H4>
<P CLASS="paragraph">
<A NAME="pgfId-1102125"></A>Redefines class represents the relationship between a MacroUnit and another MacroUnit (usually with the same name) where the origin MacroUnit is a redefinition of the MacroUnit that is the target of the relationship. In many preprocessors, the redefinition is achieved simply by providing another macro definition with the same name. KDM Expands relationships are expected to correctly represent the semantics of the given preprocessor, by targeting the MacroUnit which is &quot;current&quot; definition at the given point.</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102126"></A>Superclass</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102127"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102128"></A>Associations </H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102138"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102131"></A>to:MacroUnit[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102133"></A>the old MacroUnit</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102135"></A>from:PreprocessorDirective[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102137"></A>the new MacroUnit</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102139"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1102140"></A>	The origin of the Redefines relationship should be a MacroUnit</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102141"></A>Semantics: </H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102142"></A>It is the implementer's responsibility to identify and represent redefinitions of macro units according to the semantics of the particular preprocessor.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102143"></A>Example (C preprocessor):</H6>
<P CLASS="example">
<A NAME="pgfId-1102144"></A>#define A 1</P>
<P CLASS="example">
<A NAME="pgfId-1102145"></A>#define A 2</P>
<P CLASS="example">
<A NAME="pgfId-1102146"></A>#undef A</P>
<P CLASS="example">
<A NAME="pgfId-1102147"></A>#pragma once</P>
<P CLASS="paragraph">
<A NAME="pgfId-1102148"></A>&nbsp;</P>
<P CLASS="example">
<A NAME="pgfId-1102149"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102150"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; xmlns:xmi=&quot;http://www.omg.org/XMI&quot; xmlns:code=&quot;http://kdm.omg.org/code&quot; xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Preprocessor Directives example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102151"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102152"></A>    &lt;extensionFamily xmi:id=&quot;id.1&quot; &gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102153"></A>      &lt;stereotype xmi:id=&quot;id.2&quot; name=&quot;directive&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102154"></A>        &lt;tag xmi:id=&quot;id.3&quot; tag=&quot;directive_type&quot; type=&quot;String&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102155"></A>      &lt;/stereotype&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102156"></A>    &lt;/extensionFamily&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102157"></A>    &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;A&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102158"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#define A 1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102159"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102160"></A>    &lt;codeElement xmi:id=&quot;id.5&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;DEBUG&quot; kind=&quot;option&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102161"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#define DEBUG&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102162"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102163"></A>    &lt;codeElement xmi:id=&quot;id.6&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;A&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102164"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#define A 2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102165"></A>      &lt;codeRelation xmi:id=&quot;id.7&quot; xmi:type=&quot;code:Redefines&quot; to=&quot;id.4&quot; from=&quot;id.6&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102166"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102167"></A>    &lt;codeElement xmi:id=&quot;id.8&quot; xmi:type=&quot;code:MacroUnit&quot; name=&quot;A&quot; kind=&quot;undefined&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102168"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#undef A&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102169"></A>      &lt;codeRelation xmi:id=&quot;id.9&quot; xmi:type=&quot;code:Redefines&quot; to=&quot;id.6&quot; from=&quot;id.8&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102170"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102171"></A>    &lt;codeElement xmi:id=&quot;id.10&quot; xmi:type=&quot;code:PreprocessorDirective&quot; stereotype=&quot;id.2&quot; name=&quot;d1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102172"></A>      &lt;taggedValue xmi:id=&quot;id.11&quot; xmi:type=&quot;kdm:TaggedValue&quot; tag=&quot;id.3&quot; value=&quot;pragma once&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102173"></A>      &lt;source language=&quot;Cpreprocessor&quot; snippet=&quot;#pragma once&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102174"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102175"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102176"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1102177"></A>&nbsp;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099228"></A>&nbsp;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099133"></A>&nbsp;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1099134"></A>&nbsp;</P>
<P CLASS="Header">
<A NAME="pgfId-1094674"></A>Miscellaneous Code Elements</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1092682"></A><A NAME="_Toc131848278"></A>Comments Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1092684"></A>The Comments class diagram defines meta-model elements that represent comments. Comment is at the bottom of the inheritance hierarchy so that it can occur in all containers without restrictions. The classes and associations of the Comments diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#83916" CLASS="XRef">See - Comments Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1092630"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-21.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1092750"></A><A NAME="83916"></A>- Comments Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1092763"></A><A NAME="_Toc131848279"></A>CommentUnit Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1092764"></A>The CommentUnit is a meta-model element which represents comments in existing systems (including any special comments). CommentUnit element can be used to introduce comments during transformation of the existing system (including special comments).</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097977"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1092768"></A>ModelElement</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099894"></A>Attributes</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099904"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099897"></A>text:String</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099899"></A>the representation of the comment</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1092770"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1092772"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1102464"></A>CommentUnit represents comments in the source code. CommentUnits are associated with a certain code element. It is the implementer's responsibility to make a adequate decision on how to associate line comments with the surrounding elements in the source code. </P>
<P CLASS="paragraph">
<A NAME="pgfId-1102461"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1099879"></A>AbstractCodeElement Class (additional properties)</H4>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099916"></A>Associations</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099926"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099919"></A>comment:CommentUnit[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099921"></A>CommentUnits associated with the AbstractCodeElement</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099891"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099884"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1099876"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1092776"></A><A NAME="_Toc131848280"></A>Visibility Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1092778"></A>The Visibility class diagram defines meta-model elements that represent visibility of code elements in their corresponding containers. The classes and associations that make up the Visibility diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#49090" CLASS="XRef">See - Visibility Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1092752"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-22.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1092631"></A><A NAME="49090"></A>- Visibility Class Diagram</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1093806"></A>&nbsp;</P>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1092863"></A><A NAME="_Toc131848282"></A>Namespace Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1092864"></A>The Namespace is a specific meta-model element that represents can be the target of the VisibleIn or Imports visibility relationships. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1092866"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1092867"></A>CodeItem</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102481"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1102491"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1102484"></A>groupedCode:CodeItem[0..*]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1102486"></A>a KDM group of code elements which belong to the namespace. The actual owners of these elements are the corresponding modules, not the namespace, since namespaces can, in general cross cut the module boundaries.</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1092869"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1102516"></A>Namespace element should not belong to own group</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1092871"></A>Semantics</H6>
<P CLASS="Body">
<A NAME="pgfId-1099670"></A>A Namespace is a group of code element. A Namespace can be owned by Module element or one of its subclasses. Namespace class represents a unit of visibility (for example, the namespace concept in C++).</P>
<P CLASS="Body">
<A NAME="pgfId-1099671"></A>An anonymous namespace can represent a group of code element that are the target of an Imports relationship</P>
<P CLASS="Body">
<A NAME="pgfId-1092872"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1097990"></A>VisibilityRelations Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1097991"></A>The VisibilityRelations class diagram defines meta-model elements that represent visibility of code elements in their corresponding containers. The classes and associations of the Visibility diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#49090" CLASS="XRef">See - Visibility Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1097998"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-23.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1098000"></A>- VisibilityRelations Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1098002"></A>VisibleIn Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1098003"></A>The VisibleIn is a specific meta-model element that represents semantic relation between two code items, where one provides the restricted visibility context for another code item. </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098004"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1098005"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098006"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1098016"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098009"></A>from:CodeItem[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1098011"></A>The CodeItem visibility of which is specified.</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1098013"></A>to:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1098015"></A>The CodeItem that provides the visibility context.</P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1098017"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098018"></A>Constraints</H6>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1098019"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1102536"></A>VisibleIn optional relationship represents an association between a code item and one of the containers which corresponds to the visibility scope of the first item. This relationship is optional, since all other KDM relationship are determined by the semantics of the target language, including the visibility rules.</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1102543"></A>Example:</H6>
<P CLASS="example">
<A NAME="pgfId-1102550"></A>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102551"></A>&lt;kdm:Segment xmi:version=&quot;2.1&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102597"></A>	xmlns:xmi=&quot;http://www.omg.org/XMI&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102598"></A>	xmlns:action=&quot;http://kdm.omg.org/action&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102599"></A>	xmlns:code=&quot;http://kdm.omg.org/code&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102600"></A>	xmlns:kdm=&quot;http://kdm.omg.org/kdm&quot; name=&quot;Visibility and Comment Example&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102552"></A>  &lt;model xmi:id=&quot;id.0&quot; xmi:type=&quot;code:CodeModel&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102553"></A>    &lt;codeElement xmi:id=&quot;id.1&quot; xmi:type=&quot;code:CodeAssembly&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102554"></A>      &lt;codeElement xmi:id=&quot;id.2&quot; xmi:type=&quot;code:NamespaceUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102601"></A>			name=&quot;ab&quot; groupedCode=&quot;id.4 id.9 id.13&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102555"></A>      &lt;codeElement xmi:id=&quot;id.3&quot; xmi:type=&quot;code:CompilationUnit&quot; name=&quot;a&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102556"></A>        &lt;codeElement xmi:id=&quot;id.4&quot; xmi:type=&quot;code:CallableUnit&quot; </P>
<P CLASS="example">
<A NAME="pgfId-1102602"></A>			name=&quot;foo&quot; type=&quot;id.8&quot; kind=&quot;regular&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102557"></A>          &lt;comment text=&quot;Comment #1 to foo&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102558"></A>          &lt;comment text=&quot;Comment #2 to foo&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102559"></A>          &lt;codeRelation xmi:id=&quot;id.5&quot; xmi:type=&quot;code:VisibleIn&quot; to=&quot;id.2&quot; from=&quot;id.4&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102560"></A>          &lt;codeElement xmi:id=&quot;id.6&quot; xmi:type=&quot;action:ActionElement&quot; name=&quot;a1&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102561"></A>            &lt;comment xmi:id=&quot;id.7&quot; text=&quot;Comment to action element a1&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102562"></A>          &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102563"></A>          &lt;codeElement xmi:id=&quot;id.8&quot; xmi:type=&quot;code:Signature&quot; name=&quot;foo&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102564"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102565"></A>        &lt;codeElement xmi:id=&quot;id.9&quot; xmi:type=&quot;code:IntegerType&quot; name=&quot;int&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102566"></A>          &lt;comment xmi:id=&quot;id.10&quot; text=&quot;Comment to integer type&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102567"></A>          &lt;codeRelation xmi:id=&quot;id.11&quot; xmi:type=&quot;code:VisibleIn&quot; to=&quot;id.2&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102568"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102569"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102570"></A>      &lt;codeElement xmi:id=&quot;id.12&quot; xmi:type=&quot;code:CompilationUnit&quot; name=&quot;b&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102571"></A>        &lt;codeElement xmi:id=&quot;id.13&quot; xmi:type=&quot;code:RecordType&quot; name=&quot;bar&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102572"></A>          &lt;comment xmi:id=&quot;id.14&quot; text=&quot;Comment to record type bar&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102573"></A>          &lt;codeRelation xmi:id=&quot;id.15&quot; xmi:type=&quot;code:VisibleIn&quot; to=&quot;id.2&quot; from=&quot;id.13&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102574"></A>          &lt;itemUnit xmi:id=&quot;id.16&quot; name=&quot;foobar&quot; type=&quot;id.9&quot;&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102575"></A>            &lt;comment xmi:id=&quot;id.17&quot; text=&quot;Comment to item unit foobar&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102576"></A>            &lt;codeRelation xmi:id=&quot;id.18&quot; xmi:type=&quot;code:VisibleIn&quot; to=&quot;id.13&quot; from=&quot;id.16&quot;/&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102577"></A>          &lt;/itemUnit&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102578"></A>        &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102579"></A>      &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102580"></A>    &lt;/codeElement&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102581"></A>  &lt;/model&gt;</P>
<P CLASS="example">
<A NAME="pgfId-1102582"></A>&lt;/kdm:Segment&gt;</P>
<P CLASS="paragraph">
<A NAME="pgfId-1102548"></A>&nbsp;</P>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1099564"></A><A NAME="_Toc131848330"></A>Imports Class</H4>
<P CLASS="Body">
<A NAME="pgfId-1099590"></A>The Imports meta-model element represents an association between two CodeItems where one CodeItem &quot;imports&quot; definitions from another. The &quot;import&quot; relationship is common to several programming languages (for example, the import statement in Java). In this relationship the origin CodeItem (usually, a CompilationUnit or a subclass of Module) resolves the visibility of certain names that are defined (owned) by the target CodeItem (usually, another CompilationUnit or some other subclass of Module, but possibly a NamespaceUnit from another CodeItem, or even an individual code element). The Imports class simply represents the &quot;import&quot; relationships between CodeItem, for example, for tracking dependencies between packages. KDM representations themselves do not require additional import statements in order to have relationships between CodeItem, or even between different models.</P>
<P CLASS="Body">
<A NAME="pgfId-1099591"></A>&nbsp;</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099566"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1099567"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099568"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1099578"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099571"></A>from:CodeItem[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1099573"></A>a subclass of CodeResource that represent the &quot;consumer&quot; of the imported definitions</P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1099575"></A>to:CodeItem[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="CellBody">
<A NAME="pgfId-1099577"></A>a subclass of CodeResource that represent the &quot;owner&quot; of the imported definitions</P>
</TD>
</TR>
</TABLE>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099579"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1099651"></A>	The origin of the Imports relationship should be an subclass of Module</H6>
</DIV>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1099580"></A>Semantics</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1098020"></A>It is the implementer's responsibility to identify and represent import directives and their targets according to the semantics of the programming language of the existing software system.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H3 CLASS="Heading1">
<A NAME="pgfId-1097560"></A>ExtendedCodeElements Class Diagram</H3>
<P CLASS="Body">
<A NAME="pgfId-1100168"></A>The ExtendedCodeElements class diagram defines two &quot;wildcard&quot; generic elements for the code model as determined by the KDM model pattern: a generic code entity and a generic code relationship.</P>
<P CLASS="Body">
<A NAME="pgfId-1097561"></A> The classes and associations of the ExtendedCodeElements diagram are shown in <A HREF="KDM_1.0_12_codepkg.htm#49090" CLASS="XRef">See - Visibility Class Diagram.</A>.</P>
<P CLASS="Body">
<A NAME="pgfId-1097568"></A>&nbsp;</P>
<DIV>
<IMG SRC="KDM_1.0_12_codepkg-24.gif">
</DIV>
<DIV>
<H6 CLASS="FigureCaption-">
<A NAME="pgfId-1097570"></A>- ExtendedCodeElements Class Diagram</H6>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097572"></A>CodeElement Class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1097573"></A>The CodeElement is a generic meta-model element that can be used to define new &quot;virtual&quot; meta-model elements through the KDM light-weight extension mechanism</P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097574"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097575"></A>CodeItem</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097652"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1100194"></A>CodeElement should have at least one stereotype</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1097590"></A>Semantics</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100185"></A>A code entity with under specified semantics. It is a concrete class that can be used as the base element of a new &quot;virtual&quot; meta-model entity types of the code model. This is one of the KDM extension points which can integrate additional language-specific, application-specific or implementer-specific pieces of knowledge into the standard KDM representation.</P>
</DIV>
</DIV>
</DIV>
<DIV>
<H4 CLASS="Heading2">
<A NAME="pgfId-1097592"></A>CodeRelationship Class (generic)</H4>
<P CLASS="Body">
<A NAME="pgfId-1097593"></A>The CodeRelationship is a generic meta-model element that can be used to define new &quot;virtual&quot; meta-model elements through the KDM light-weight extension mechanism </P>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097594"></A>Superclass</H6>
<P CLASS="Body">
<A NAME="pgfId-1097595"></A>AbstractCodeRelationship</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097633"></A>Associations</H6>
<P CLASS="Body">
<A NAME="pgfId-1097643"></A>&nbsp;</P>
<TABLE BORDER="1">
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097636"></A>from:CodeItem[1] </P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097638"></A>The CodeItem </P>
</TD>
</TR>
<TR>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText1">
<A NAME="pgfId-1097640"></A>to:KDMEntity[1]</P>
</TD>
<TD ROWSPAN="1" COLSPAN="1">
<P CLASS="TableText">
<A NAME="pgfId-1097642"></A>The KDMEntity </P>
</TD>
</TR>
</TABLE>
<P CLASS="Body">
<A NAME="pgfId-1097644"></A>&nbsp;</P>
</DIV>
<DIV>
<H6 CLASS="Heading4">
<A NAME="pgfId-1097645"></A>Constraints</H6>
<DIV>
<H6 CLASS="List1">
<A NAME="pgfId-1100203"></A>CodeRelationship should have at least one stereotype</H6>
<P CLASS="paragraph">
<A NAME="pgfId-1100204"></A>Semantics</P>
<P CLASS="paragraph">
<A NAME="pgfId-1100205"></A>A code relationship with under specified semantics. It is a concrete class that can be used as the base element of a new &quot;virtual&quot; meta-model relationship types of the code model. This is one of the KDM extension points which can integrate additional language-specific, application-specific or implementer-specific pieces of knowledge into the standard KDM representation.</P>
<P CLASS="Body">
<A NAME="pgfId-1097631"></A>&nbsp;</P>
<P CLASS="Body">
<A NAME="pgfId-1088609"></A>&nbsp;</P>
</DIV>
</DIV>
</DIV>
</DIV>
</BODY>
</HTML>
